Skip to content
Raphael Stoeckli edited this page Aug 25, 2018 · 4 revisions

Q: Is NanoXLSX 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 NanoXLSX is to export data from your application to Excel files or to read basic data from an Excel file. 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. When it comes to imports, NanoXLSX provides an easy way of reading data from a Excel file without the necessity of converting the file to CSV or other text formats.

Q: Is there more documentation than the Wiki and the Readme?
A: Please see the full API-Documentation at: https://rabanti-github.github.io/NanoXLSX/ 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 mainly an exporter and basic reader 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 NanoXLSX 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, NanoXLSX provides a big variety of functions like styling, worksheet protection, meta data , formula support or retrieval of existing XLSX files, and does not require the OOXML SDK.

Q: Why 'Nano'?
A: NanoXLSX is designed as very small library. There are also some limitations like the lack of diagrams or no support of macros. It is intended as a library as small as possible.

Q: Does NanoXLSX need an installation of Excel or other libraries to create XLSX files?
A: No, only the assembly WindowsBase to write files and System.IO.Compression to read files are necessary, if you want to compile the library by yourself. But there are no further requirements out of the box.

Q: Can NanoXLSX also read Excel files?
Excel A: Yes, in contrast to PicoXLSX has NanoXLSX the ability to read Excel files. However, this ability is limited to a basic level.

Q: Can NanoXLSX 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 and formulas as strings. When Excel files are loaded, numeric values are represented as doubles, since an Excel file does not contain data about the actual numeric data type.

Q: Can cells be formatted, when writing files?
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: Can cells formats be retrieved when reading files?
A: No. Currently, all style information is neglected when reading Excel files

Q: Is it possible to read diagrams or encrypted Excel files with NanoXLSX?
A: No, the encryption and decryption of entire Excel files is not supported yes. Furthermore, other Data than plain cell values and formulas are not supported.

Q: Are Unicode characters supported as cell value, when writing Excel files?
A: Yes, the library supports UTF-8 and was tested with Japanese and Chinese characters, as well as special characters from German and French. Reading of UTF-8 should be also no problem.

Q: Is it possible to create or read 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 NanoXLSX also be used for Windows RT, Windows Phone 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 NanoXLSX on these platforms. Mono may work with minor changes since System.IO.Packaging seems to be implemented.

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: How are formulas retrieved when reading Excel files?
A: Formulas are retrieved as plain text. If a formula pints to the cell A1, for instance, the cell value of this formula will be simply a string “A1”. The leading equal sign is omitted.

Q: What is the easiest way to use NanoXLSX?
A: The easiest way is to use NuGet. Simply add NanoXLSX as package to your project.

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 NanoXLSX. 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. But I get only the message that the project was created with a newer version of the IDE. What can be done?
A: NanoXLSX was originally created with Visual Studio 2017. If you use 2015 or an older version you can create a new solution in your IDE and copy just the .CS files from the NanoXLSX solution into the new project. As long as the .NET version is sufficient to compile NanoXLSX, your newly created solution should work.

Q: When I include the classes of NanoXLSX 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 and/or System.IO.Compression. Please look at the requirements to include this assembly.

Q: I included NanoXLSX.dll into my solution added a reference in the IDE but get the error "The type or namespace name 'NanoXLSX' 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 source files of NanoXLSX instead, respectively try to compile the library in your default .NET version.

Q: I cannot find the necessary WindowsBase.dll or System.IO.Compression.dll. There are no such files on my systems.
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 or System.IO.Compression assembly. Otherwise look into the folder "c:\Windows\Microsoft.NET\assembly\GAC_MSIL\WindowsBase" and “c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.IO.Compression”. There should be a sub-folders with the matching assemblies as DLLs.

Clone this wiki locally