- Support for .NET Framework 4.5 was dropped, the minimum supported Framework version is now 4.6.2.
- The root namespace was changed from
MiniExcelLibstoMiniExcelLib; there is also a new entry point to the library, the static classMiniExcelV2. The original class has been turned into a facade for backwards compatibility reasons (more on that later). - Instead of having all methods being part of a single static class, the functionalities are now split into 3 providers:
MiniExcelV2.Importers,MiniExcelV2.ExportersandMiniExcelV2.Templaterswill give you access to, respectively, theMiniExcelImporterProvider,MiniExcelExporterProviderandMiniExcelTemplaterProvider. - This way Excel and Csv query methods are split between the
OpenXmlImporterand theCsvImporter, accessible from theMiniExcelImporterProvider. - The same structure was adopted for export methods through
OpenXmlExporterandCsvExporter, while template methods are instead currently only found inOpenXmlTemplater. - OpenXml and Csv methods are only available if the respective
MiniExcel.OpenXmlandMiniExcel.Csvpackages are downloaded, or if the completeMiniExcelpackage is installed. - You can only access the conversion methods
ConvertCsvToXlsxandConvertXlsxToCsvfrom theMiniExcelConverterutility class, which is part of the full MiniExcel package. - If the full MiniExcel package is downloaded, the previous namespace will coexist along the new one, containing a facade
MiniExcelstatic class with all the original methods' signatures for backwards compatibility. IConfigurationis nowIMiniExcelConfiguration, but most methods now require the proper implementation (OpenXmlConfigurationorCsvConfiguration) to be provided rather than the interface- MiniExcel now fully supports asynchronously streaming the queries,
so the return type for
OpenXmlImporter.QueryAsyncisIAsyncEnumerable<T>instead ofTask<IEnumerable<T>> - When applying a template, unlike version 1.x, the flag for overwriting an already existing file must be provided explicitly.
- A
leaveOpenparameter has been added to most methods that take a stream as input in bothOpenXmlImporterandCsvImporterto configure whether the stream must be disposed after the operation performed is completed. - The
useHeaderRowparameter in multipleOpenXmlImporterandCsvImportermethods has been renamed tohasHeaderRowfor making its usage clearer. CsvExporter.ExportAPI methods, not being required to return the same type ofOpenXmlExporter.Export, now returnintinstead ofint[].