Skip to content
Raphael Stoeckli edited this page Aug 31, 2020 · 25 revisions

Q: Is PicoXLSX 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 PicoXLSX 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 than the Wiki and the Readme?
A: Please see the full API-Documentation at: https://rabanti-github.github.io/PicoXLSX/ for more details.

Q: Why should anyone use this library? Excel over Interop is not that hard and other solutions are also out there.
A: This library was created to provide an exporter for portable programs. These programs should also work if there is no Excel installed or only an outdated version of Office (e.g., industrial terminals, test VMs, thin clients). In this case, Interop is unreliable or does not work at all. Other powerful libraries exist, yes. The benefits of PicoXLSX are the low requirements, the small physical library size, and the easy usage (see demo programs). Plus, it is possible to compile the library into your application if you use the source files. No further DLLs are required besides the executable of the program. Although there are other libraries with a small footprint as well, PicoXLSX provides a big variety of functions like styling, worksheet protection, meta data or formula support, and does not require the OOXML SDK.

Q: Why 'Pico'?
A: PicoXLSX is designed as 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 NanoXLSX) in the future.

Q: Does PicoXLSX need an installation of Excel or other libraries to create XLSX files?
A: No, only the assembly WindowsBase is needed, if you want to compile the library by yourself. But there are no further requirements out of the box. The goal of future development is to remove the requirement of WindowsBase, to be full portable.

Q: Can PicoXLSX 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. Have a look at the successor porject NanoXLSX for basic reader support

Q: Can PicoXLSX 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, sbyte, decimal, uint, ulong, short and ushort), boolean, DateTime, TimeSpan 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 supported as cell value?
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 PicoXLSX also be used for Windows RT, Windows Phone, .NET Core or Mono?
A: Windows RT systems do not support WindowsBase, respectively System.IO.Packaging at the moment. Therefore it is most likely not possible to use PicoXLSX on these platforms. Mono may work with minor changes since System.IO.Packaging seems to be implemented. .NET Core has has also no WindowsBase but could be ported quite easily, similar to the co-project PicoXLSX4j, which was implemented with a OS-agnostic packer. A implementation of .NET Core, .NET Standard respectively, is planned though.

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 or 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 PicoXLSX?
A: The easiest way is to use NuGet. Simply add PicoXLSX as package to your project. You can use the precompiled library (PicoXLSX.dll) and add it to your project as reference. Or you can simply copy all classes from PicoXLSX to your project. You must additionally just reference the assembly WindowsBase. You will find this assembly most likely in the assembly browser of your IDE. Otherwise search after WindowsBase.dll on your computer.

Q: There is an error (unsupported) concerning the documentation project, when I clone the solution into an IDE. What is wrong?
A: You are missing the Sandcastle Help File Builder (SHFB). This Visual Studio package is needed to compile the documentation project of PicoXLSX. Install SHFB to get rid of this error or simply exclude the documentation project if you don't need a documentation project. Alternatively, you can compile the documentation with the SHFB standalone application.

Q: I try to open the Solution in Visual Studio / my IDE of choice. But I get only the message that the project was created with a newer version of the IDE. What can be done?
A: PicoXLSX was originally created with Visual Studio 2012 and later ported to 2017. If you use an older VS version or another Editor, you can create a new solution in your IDE and copy just the .CS files from the PicoXLSX solution into the new project. As long as the .NET version is sufficient to compile PicoXLSX, your newly created solution should work.

Q: When I include the classes of PicoXLSX into my project, many errors are emerging. The reference System.IO.Packaging also seems not to be valid. What is wrong?
A: You are missing the assembly WindowsBase. Please look at the requirements to include this assembly.

Q: I included PicoXLSX.dll into my solution added a reference in the IDE but get the error "The type or namespace name 'PicoXLSX' could not be found (are you missing a using directive or an assembly reference?)" when I try to compile the solution. What is wrong?
A: The .NET version of your solution does not match with the version of the DLL. Try to change the version of your solution to the version of the DLL (currently v4.5). If you cannot change the version, try to use the few source files of PicoXLSX instead, respectively try to compile the library in your default .NET version.

Q: I cannot find the necessary WindowsBase.dll under "C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0". There is no such folder.
A: You have probably not installed Microsoft Visual Studio. Then you can use the Global Assembly Cache (GAC) of Windows. If your IDE supports selecting from the GAC, search there for the WindowsBase assembly. Otherwise look into the folder "c:\Windows\Microsoft.NET\assembly\GAC_MSIL\WindowsBase". There should be a sub-folder with the matching assembly as DLL.

Clone this wiki locally