Skip to content
Raphael Stoeckli edited this page Dec 13, 2018 · 18 revisions

Q: Is PicoXLSX4j free?
A: Yes, it is absolutely free under the MIT license. You can use the library also for commercial applications. There is also no Pro-version. You get all the features for free.

Q: What is the purpose of the library?
A: The main purpose of PicoXLSX4j is to export data from your application to excel files. Exports are often a requirement in many programs. But Text or CSV cannot carry formatting, formulas or more than one worksheet. The library provides an easy data export.

Q: Is there more documentation tan the Wiki and the Readme?
A: Please see the full API-Documentation at: https://rabanti-github.github.io/PicoXLSX4j/ for more details

Q: Why should anyone use this library? There are powerful solutions like POI.
A: This library (originally PicoXLSX for C#) was created to provide an exporter for portable programs (e.g. on industrial terminals, test VMs, thin clients, servers). The idea was to create a library with very low requirements to go easy on resources. Other powerful libraries like POI will most likely consume more resources, have various dependencies and are probably harder to handle, whereas PicoXLSX4j has very low requirements, provides a small physical library size and is very easy to use (see demo programs).

Q: Why 'Pico'?
A: PicoXLSX4j is designed as (relatively) very small library. There are also many limitations like the lack of diagrams or the capability of reading XLSX files. However, such functions are may be implemented in other, 'bigger' libraries (like NanoXLSX4j) in the future.

Q: Does PicoXLSX4j need an installation of Excel or other (JAR-)libraries to create XLSX files?
A: No, PicoXLSX4j only uses built-in functions of the standard JRE (Java 8 or 7)

Q: Can PicoXLSX4j also read Excel files?
A: No, it is a write-only library. Its main purpose is to provide an easy way to export things to an Excel file.

Q: Can PicoXLSX4j also create charts or other elements like shapes or text fields?
A: No, only worksheets with cell values, formatting and several other options are supported.

Q: Which data types are supported for the cells?
A: Strings (text), numeric types (integer, long, double, float, byte, short and BigDecimal), boolean, Date and formulas as strings.

Q: Can cells be formatted?
A: Yes. Styling is supported and basic styles like bold text, cell borders, text alignment, number formats and background colors are easy to call (BasicStyles class). However, there is a big variety of style combinations. It may be rather complicated to define very specific styles, like custom fonts in combination with gridlines, background colors and text alignment. Appending style information (.append(...)) can help to manage complex styles easier.

Q: Are Unicode characters as cell value supported?
A: Yes, the library supports UTF-8 and was tested with Japanese and Chinese characters, as well as special characters from German and French.

Q: Is it possible to create more than one worksheet in one workbook?
A: Yes, there is no limitation, except the memory of your system, respectively limitations by programs like Excel. Keep also in mind that there are other limitations of Excel, like a maximum row number of 1048576 and a maximum column number of 16384.

Q: Can PicoXLSX4j also be used on mobile platforms like Android ?
A: Probably not. A standard JRE is necessary. Android apps are written in Java syntax but uses a different runtime. A port may be possible but not planned yet.

Q: Is it possible to use the standard Excel formulas?
A: No, unfortunately another syntax is used in OOXML. For example FLOOR is called ROUNDDOWN. The syntax can be looked up in the OOXML documentation or easier yet, when opening an excel file with the desired formula as ZIP file using a tool like Media-Extractor. Then you can look into the file \xl\worksheets\sheet1.xml (if you took the formula in the first worksheet).

Q: What is the easiest way to use PicoXLSX4j?
A: The easiest way is to use Maven or Gradle. Simply add PicoXLSX4j as dependency to your POM or Gradle file. You can use the precompiled library ( PicoXLSX4j-[version number].jar) and add it to the lib folder of your Java project. You can also add the .java files directly to your project. Please use refactoring to change the package structure.
If you work with Maven or another tool that can handle Maven repositories, you can define PicoXLSX4j as dependency
(group ID: ch.rabanti, artifact ID: picoxlsx4j)

Q: Is there a difference to PicoXLSX for C#?
A: No, except the coding conventions (using getters and setters instead of properties etc.) and some changes due to specifics/limitations of Java in the area of generics. PicoXLSX4j is a direct and fully functional port of the C# library. This means that the API of PicoXLSX and PicoXLSX4j have the exact same functional scope.
By the way... If you find a bug in PicoXLSX4j, the exact same bug will certainly exist in PicoXLSX (or vice versa) and can be fixed usually with the same measures :-)

Clone this wiki locally