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;
}
```
Please provide a solution.
Comments: More info... If I manually create a new Excel file, I can open it with the code above. However, if I use ClosedXML to create the file from scratch and save it... then I go back and try to open the file, I get the error message.
```
try
{
var workbook = new XLWorkbook(FILE_PATH);
}
catch (Exception ex)
{
throw;
}
```
Please provide a solution.
Comments: More info... If I manually create a new Excel file, I can open it with the code above. However, if I use ClosedXML to create the file from scratch and save it... then I go back and try to open the file, I get the error message.