4

I am using the closed XML for generating the excel template. After filling the data in the generated excel, I am trying to import the excel with data. It returns error "The specified package is invalid. The main part is missing." . I am using XLSX file.

try
 {
      var   workbook = new XLWorkbook(FILE_PATH);
}
catch (Exception ex)
{   
         throw;
}

It throws error when creating object of XLWOrkbook using the excel template generated.

Please provide a solution,

Thanks in Advance...

Razack
  • 950
  • 3
  • 13
  • 26

1 Answers1

3

I got the issue. My file was in the format "Strict Open XML Spreadsheet". I have changed into "Excel Workbook". It might be useful for you.

Razack
  • 950
  • 3
  • 13
  • 26