![]() |
VOOZH | about |
dotnet add package MeshWeaver.DataSetReader.Excel.Utils --version 2.5.0
NuGet\Install-Package MeshWeaver.DataSetReader.Excel.Utils -Version 2.5.0
<PackageReference Include="MeshWeaver.DataSetReader.Excel.Utils" Version="2.5.0" />
<PackageVersion Include="MeshWeaver.DataSetReader.Excel.Utils" Version="2.5.0" />Directory.Packages.props
<PackageReference Include="MeshWeaver.DataSetReader.Excel.Utils" />Project file
paket add MeshWeaver.DataSetReader.Excel.Utils --version 2.5.0
#r "nuget: MeshWeaver.DataSetReader.Excel.Utils, 2.5.0"
#:package MeshWeaver.DataSetReader.Excel.Utils@2.5.0
#addin nuget:?package=MeshWeaver.DataSetReader.Excel.Utils&version=2.5.0Install as a Cake Addin
#tool nuget:?package=MeshWeaver.DataSetReader.Excel.Utils&version=2.5.0Install as a Cake Tool
MeshWeaver.DataSetReader.Excel.Utils is a utility library that provides common functionality and abstractions for Excel file reading in the MeshWeaver ecosystem. It serves as the foundation for both binary (.xls) and OpenXML (.xlsx) format readers.
The library provides:
The main interface for Excel data reading implementations:
public interface IExcelDataReader : IDataReader
{
void Initialize(Stream fileStream);
DataSet AsDataSet();
DataSet AsDataSet(bool convertOADateTime);
bool IsValid { get; }
string Name { get; }
int ResultsCount { get; }
bool IsFirstRowAsColumnNames { get; set; }
}
public static class Helpers
{
// Convert Excel OLE Automation date to DateTime
public static object ConvertFromOATime(double value);
// Convert escaped characters in strings
public static string ConvertEscapeChars(string input);
// Convert Int64 bits to double (for binary formats)
public static double Int64BitsToDouble(long value);
}
public static class Helpers
{
// Fix and optimize data types in DataSet
public static void FixDataTypes(DataSet dataset);
// Handle duplicate column names
public static void AddColumnHandleDuplicate(DataTable table, string columnName);
}
public class ZipWorker
{
// Access workbook and shared strings streams
public Stream GetWorkbookStream();
public Stream GetSharedStringsStream();
public Stream GetStylesStream();
}
public static class ExcelConstants
{
// Common Excel format constants
public const int MaxWorksheetColumns = 16384;
public const int MaxWorksheetRows = 1048576;
public const int MaxWorksheetNameLength = 31;
}
BiffRecordException - For BIFF record parsing errorsHeaderException - For header parsing errorsExcelReaderException - Base exception for Excel reading errorspublic static class Errors
{
public const string InvalidPassword = "Invalid password";
public const string InvalidFile = "Invalid file";
public const string NotSupported = "Not supported";
}
Format Support
Data Processing
Error Handling
Performance Optimizations
Resource Management
using (var stream = File.OpenRead("data.xlsx"))
{
var reader = new ExcelReader();
reader.Initialize(stream);
// Process data
}
Data Type Handling
var dataset = reader.AsDataSet();
Helpers.FixDataTypes(dataset); // Optimize data types
Error Handling
try
{
reader.Initialize(stream);
if (!reader.IsValid)
throw new ExcelReaderException(reader.ExceptionMessage);
}
catch (BiffRecordException ex)
{
// Handle BIFF format errors
}
public class ExcelReader : IExcelDataReader
{
protected readonly ZipWorker ZipWorker;
public void Initialize(Stream stream)
{
ZipWorker.Initialize(stream);
// Initialize reader
}
}
services.AddMessageHub(hub => hub
.ConfigureServices(services => services
.AddTransient<IExcelDataReader, ExcelReader>()
)
);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on MeshWeaver.DataSetReader.Excel.Utils:
| Package | Downloads |
|---|---|
|
MeshWeaver.DataSetReader.Excel.OpenXmlFormat
Package Description |
|
|
MeshWeaver.DataSetReader.Excel.BinaryFormat
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-preview1 | 133 | 4/16/2026 |
| 2.5.0 | 274 | 11/3/2025 |
| 2.4.0 | 251 | 10/2/2025 |
| 2.3.0 | 294 | 8/4/2025 |
| 2.2.0 | 573 | 7/21/2025 |
| 2.1.0 | 265 | 4/6/2025 |
| 2.0.3 | 591 | 3/24/2025 |
| 2.0.2 | 559 | 3/24/2025 |
| 2.0.1 | 213 | 3/21/2025 |
| 2.0.0 | 259 | 3/20/2025 |
| 2.0.0-preview3 | 193 | 2/28/2025 |
| 2.0.0-Preview2 | 218 | 2/10/2025 |
| 2.0.0-preview1 | 199 | 1/6/2025 |
| 1.0.1 | 242 | 10/8/2024 |
| 1.0.0 | 225 | 10/8/2024 |