helper-NPOIwrap-use-Excel-xlsx 1.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package helper-NPOIwrap-use-Excel-xlsx --version 1.0.6                
NuGet\Install-Package helper-NPOIwrap-use-Excel-xlsx -Version 1.0.6                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="helper-NPOIwrap-use-Excel-xlsx" Version="1.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add helper-NPOIwrap-use-Excel-xlsx --version 1.0.6                
#r "nuget: helper-NPOIwrap-use-Excel-xlsx, 1.0.6"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install helper-NPOIwrap-use-Excel-xlsx as a Cake Addin
#addin nuget:?package=helper-NPOIwrap-use-Excel-xlsx&version=1.0.6

// Install helper-NPOIwrap-use-Excel-xlsx as a Cake Tool
#tool nuget:?package=helper-NPOIwrap-use-Excel-xlsx&version=1.0.6                

THIS DLL IS AVAILABLE AS NUGET-PACKAGE 'helper-NPOIwrap-use-Excel-xlsx.1.0.6.nupkg'

1. my motivation

Seeing NPOI and using it is great. Usage for my own software is reading and writing data from/to real Excel files.
To wrap NPOI there are just a few use cases that need to be cared for if you listen to NPOI's creator and your own view about the data I/O.
There are just 3 kinds of cells used: 'string', 'numeric' and 'function' - while i don't need 'function'.
Concerning that i analysed the lines: there are special ones ( 'mixed' ) and the general list types ( 'string', 'double' ). For both cases you can use the given classes:

  • ExcelDataRow: the mixed special version only as example. You would create your own data mixture in that way.
  • ExcelDataRowListString/-Double: the list type having only one celltype in the row

Value is not in empty cells on the program side - but you buffer in whole blocks of data. You can use header lines to mark your data in your own logic.

2. Procedure:

I added functions to get and to give data to the wrapper ( <u>DataList...As...(), Array...ToDataList...()</u> ). In the program you take an instance of the '<u>NPOIexcel</u>'-class and everything is wrapped.

To read from an Excel-file:

NPOIexcel myData = new NPOIexcel();	// the wrapper for **NPOI**
myData.ReadWorkbook();	// this will give you the file dialog 
myData.ReadSheets();	// first overview of the given file for the workbook
myData.ReadSheetAsListDouble( 0 );	// sheetNumber = 0, no header used, filled into dataListDouble
double[][] doubles = myData.DataListDoubleAsArrayJagged();	// there you have your Excel's file data to your convenience

You should add data from the program side into the lists and then write the file:

myData.CreateWorkbook();	// start empty
myData.CreateSheet( 0 );	// new sheet to be filled
myData.ArrayRaggedToDataListDouble( doubles );	// you give him your data
myData.CreateSheetFromListDouble( 0 );	// this adds the data now to the workbook
myData.SaveWorkbook( fileName );	// this will save the file in real excel format thanks to NPOI

I use lists to handle the workbook's possible complexity. They will be instanciated with standard values and later with the special operation of reading sheet# you can get your real headers, too.

myData.ReadSheetAsListDouble( 0, true );	// sheetNumber = 0, header used, filled into dataListDouble
string[] headers = myData.GetHeaderNo( 0 );	// sheetNumber = 0

3. Demoprogram

Demoprogram for the DLL is: WPFwithNPOI. It shows how easy you can read and write Excel-xlsx-files. Every menuitem uses its local version of the NPOIexcel-class and thus works as complete example about how-to-use the NPOIwrap on your own.

This helper class uses NPOI by
<u>Author: Tony Qu,NPOI Contributors</u>

4.Donations

You can if you want donate to me. I always can use it, thank you.

https://www.paypal.com/ncp/payment/W3K7U4K7DFUB8

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0-windows7.0

NuGet packages (1)

Showing the top 1 NuGet packages that depend on helper-NPOIwrap-use-Excel-xlsx:

Package Downloads
MatrixFFN

A feed forward network ( FFN ) with sigmoid activation function allowing 'n' hidden layers. Twin to the CPU classes are the ILGPU-versions giving you full accelerator speed.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.7 110 10/7/2024 1.0.7 is deprecated because it has critical bugs.
1.0.6 94 10/7/2024
1.0.5 97 10/7/2024
1.0.4 111 10/5/2024
1.0.3 107 10/1/2024
1.0.2 111 9/13/2024
1.0.1 115 9/12/2024
1.0.0 155 2/8/2024