C# Excel Importing- File is not Little-Endian RRS feed

  • Question

  • User-930371450 posted

    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.

    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 ---

    Thursday, April 12, 2018 6:57 AM

All replies

  • User283571144 posted

    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,


    Friday, April 13, 2018 3:03 AM
  • User409696431 posted


    From that article, do you see anything that could explain your issue?

    Friday, April 13, 2018 4:21 PM