Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Commented Unassigned: The specified package is invalid. The main part is missing. [9409]

$
0
0
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: Hi - thanks for the response! Code is: ``` // New file... var wb = new XLWorkbook(); wb.Worksheets.Add(dataSet.Tables[0]); wb.SaveAs(@"c:\\Users\\Dave\\Downloads\\output.xlsx"); ``` I loaded ClosedXML with nuget. Version is: ``` <package id="ClosedXML" version="0.76.0" targetFramework="net45" /> ``` Thanks for your help!

Viewing all articles
Browse latest Browse all 1877

Trending Articles