1

I use the following code to open an Excel file using ExcelDataReader.

excelReader = ExcelReaderFactory.CreateReader(stream, new ExcelReaderConfiguration()
            {
                FallbackEncoding = Encoding.UTF8,

                LeaveOpen = false,

                AnalyzeInitialCsvRows = 0,
            });

The issue is that Im getting the following error,

Encoding 1252 data could not be found. Make sure you have correct international codeset assembly installed and enabled.

Based on other solutions, I have also included i18N.dll and i18n.west.dll files to my project but still, the issue is persisting.

  • Tried creating a folder named "DLL" in Assets folder? Try adding all the DLL's from ```Unity\Editor\Data\Mono\lib\mono\unity``` to that folder and try again. Also change the scripting backend from IL2CPP to Mono2x. –  Jul 09 '19 at 08:48
  • Yes I tried doing so but still Im facing the same issue :( –  Jul 09 '19 at 08:54
  • try this solution as well ```https://stackoverflow.com/questions/44162955/unity-html5-error-encoding-1252-data-could-not-be-found``` –  Jul 09 '19 at 08:58

1 Answers1

0

I used:

FallbackEncoding = Encoding.GetEncoding(1252);

My code:

ExcelReaderConfiguration conf = new ExcelReaderConfiguration();
conf.FallbackEncoding = Encoding.GetEncoding(1252);


using (IExcelDataReader reader = ExcelReaderFactory.CreateReader(stream, conf))
{
....
}
                {
markotny
  • 11
  • 1