Skip to content

IGlGI/ExcelModuleNetCore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ExcelDocumentsModule

Supports .NET Core 3.xx

This module allows easy to write/read excel files to DataSet using OpenXml under the hood and supports MS Orleans ver. 3.2 and higher.

Please feel free to fork and submit pull requests to the develop branch.

Supported file formats and versions

Extension Excel Version(s)
.xlsx 2007 and newer
.xls 2003, and newer
.csv Only with the comma separator

Finding the binaries:

It's recommended to use NuGet through the VS Package Manager Console Install-Package .

Example:

Install-Package ExcelDocumentsModule -Version 1.0.0

How to use read method without MS Orleans:

/// "ReadDocument" method has bool parameter "isFirstRowHeader" which works only with .xls and .xlsx files.
/// CSV files always use the comma separator to define the first row as a header inside the DataSet. 

var excelModule = new ExcelModule();
var filePath = "../Some/Directory/FileName.xlsx";
var dataSet = excelModule.ReadDocument(filePath);

How to use write method without MS Orleans:

var excelModule = new ExcelModule();
var outputFilePath = "../Some/Directory/FileName.xlsx";
var dataSetToFile = new DataSet();
//...
// Adding some data to dataSetToFile...
//...

excelModule.WriteDocument(dataSetToFile, outputFilePath);

How to use ExcelDocumentsModule with MS Orleans:

Just replace new ExcelModule(); or container.Resolve<IExcelModule>(); to client.GetGrain<IExcelModuleOrleans>(Guid.NewGuid()); where the client is IClusterClient.

For more information look at the tests projects.

About

This module allows easy to write/read excel files using OpenXml under the hood and supports MS Orleans ver. 3.2 and higher.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages