How to open encoded Excel files in .NET Excel Library
17 Aug 20261 minute to read
XlsIO do not have direct support to open an Excel file with encoding in .NET Core. But this can be acheived through below workaround.
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
System.Text.UnicodeEncoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
IWorkbook workbook = application.Workbooks.Open("Sample.csv", System.Text.UnicodeEncoding.GetEncoding("big5"));
workbook.SaveAs("Output.csv", ",");
}