PicoXLSX |
PicoXLSX is a small .NET / C# library to create XLSX files (Microsoft Excel 2007 or newer) in an easy and native way
See the Change Log for recent updates.
PicoXLSX was created with .NET version 4.5. Newer versions like 4.6 are working and tested. Furthermore, .NET Standard 2.0 is supported since v1.6. Older versions of.NET like 3.5 and 4.0 may also work with minor changes. Some functions introduced in .NET 4.5 were used and must be adapted in this case.
The NuGet package does not require dependencies
Please note that the demo project of the .NET Standard version will not work in Visual Studio 2017. To get the build working, unload the demo project of the .NET Standard version.
The .NET version of the documentation may vary, based on the installation. If v4.5 is not available, upgrade to target to a newer version, like v4.6
Install-Package PicoXLSX
dotnet add package PicoXLSX
Workbook workbook = new Workbook("myWorkbook.xlsx", "Sheet1"); // Create new workbook with a worksheet called Sheet1
workbook.WS.Value("Some Data"); // Add cell A1
workbook.WS.Formula("=A1"); // Add formula to cell B1
workbook.WS.Down(); // Go to row 2
workbook.WS.Value(DateTime.Now, Style.BasicStyles.Bold); // Add formatted value to cell A2
workbook.Save(); // Save the workbook as myWorkbook.xlsx
Workbook workbook = new Workbook("myWorkbook.xlsx", "Sheet1"); // Create new workbook with a worksheet called Sheet1
workbook.CurrentWorksheet.AddNextCell("Some Data"); // Add cell A1
workbook.CurrentWorksheet.AddNextCell(42); // Add cell B1
workbook.CurrentWorksheet.GoToNextRow(); // Go to row 2
workbook.CurrentWorksheet.AddNextCell(DateTime.Now); // Add cell A2
workbook.Save(); // Save the workbook as myWorkbook.xlsx
| Namespace | Description |
|---|---|
| PicoXLSX | PicoXLSX is a library to generate XLSX files in an easy and native way The namespace PicoXLSX contains all classes of the library |