When I importing excel in Data table then below error is coming.
In the below code, "XlsDocument xlsDocument = new XlsDocument(FilePath); " here error is coming.
DataTable dtExcelSheetData = new DataTable();
XlsDocument xlsDocument = new XlsDocument(FilePath);
Worksheet worksSheet = xlsDocument.Workbook.Worksheets[SheetName];
DataColumn dataColumn;
Exception thrown: 'System.Web.Services.Protocols.SoapException' in System.Web.Services.dll
Additional information: System.Web.Services.Protocols.SoapException: Server was unable to process request. --->
System.NotSupportedException: File is not Little-Endian
at MyEvaluations.Business.Utilities.ExcelProcess.GetQuizExcelDataForUser(String FilePath, String SheetName, DataTable ExcelColumns, DataTable DataBaseColumns) in d:\Projects\MyEvalutions\myevals\FileUploadService\App_Code\ExcelProcess.cs:line 1356
at FileUploadComponentWebService.GetQuizExcelDataForUser(String filePath, String selectedWorkSheet, DataSet dsInput) in d:\Projects\MyEvalutions\myevals\FileUploadService\App_Code\FileUploadComponentWebService.cs:line 655
--- End of inner exception stack trace ---
According to your description and codes we couldn't directly find the reason why show the not support exception.
Could you please post more details about your excel format and content?
Which library you have used to read the excel?
If you could post more details information, it will be more easily for us to find the solution.
Best Regards,
Brando
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
60 Points
311 Posts
C# Excel Importing- File is not Little-Endian
Apr 12, 2018 06:57 AM|SSK_Nani|LINK
HI Team.
When I importing excel in Data table then below error is coming.
In the below code, "XlsDocument xlsDocument = new XlsDocument(FilePath); " here error is coming.
Star
9831 Points
3120 Posts
Re: C# Excel Importing- File is not Little-Endian
Apr 13, 2018 03:03 AM|Brando ZWZ|LINK
Hi SSK_Nani,
According to your description and codes we couldn't directly find the reason why show the not support exception.
Could you please post more details about your excel format and content?
Which library you have used to read the excel?
If you could post more details information, it will be more easily for us to find the solution.
Best Regards,
Brando
Contributor
5961 Points
2466 Posts
Re: C# Excel Importing- File is not Little-Endian
Apr 13, 2018 04:21 PM|KathyW|LINK
https://www.geeksforgeeks.org/little-and-big-endian-mystery/
From that article, do you see anything that could explain your issue?