Getting this error in the 4.0.4 that did not happen with 3.1.3.
[NotSupportedException: This property or method is not supported for a Chartsheet]
OfficeOpenXml.ExcelWorksheet.get_Tables() +221
OfficeOpenXml.ExcelWorkbook.ReadAllTables() +144
OfficeOpenXml.ExcelWorksheet.get_Tables() +78
OfficeOpenXml.ExcelWorksheet.SaveTables() +60
OfficeOpenXml.ExcelWorksheet.Save() +303
OfficeOpenXml.ExcelWorkbook.Save() +715
OfficeOpenXml.ExcelPackage.GetAsByteArray(Boolean save) +39
Nothing has changed in my code. I just updated the EPPlus.dll via Nuget.
Here is a list of methods/commands that I am running against the ExcelPackage (pck) and ExcelWorksheet (wsTarget):
* pck.GetAsByteArray(); <-- this is where it bombs
* wsTarget.Cells[ca.Target.Range].LoadFromDataTable(ds.Tables[ca.Source.Name], ca.Source.CopyHeaders)
* wsTarget.HeaderFooter.FirstHeader.LeftAlignedText = ds.Tables[ca.Source.Name].Rows[0].ItemArray[0].ToString();
* wsTarget.HeaderFooter.EvenHeader.LeftAlignedText = ds.Tables[ca.Source.Name].Rows[0].ItemArray[0].ToString();
* wsTarget.HeaderFooter.OddHeader.LeftAlignedText = ds.Tables[ca.Source.Name].Rows[0].ItemArray[0].ToString();
* wsTarget.HeaderFooter.differentFirst = false;
* wsTarget.Cells[ca.Target.Range].Style.HorizontalAlignment = eha;
* wsTarget.Cells[ca.Target.Range].Style.Numberformat.Format = ca.Source.Format;
That's pretty much it. I don't do anything else with it and these are all pretty basic API calls, so I'm not sure why it will not work in the newer version.
I back rev'd to 3.1.3 so I'm fine for now, but I thought you might want to know there may be something going on.
Comments: Fixed in changeset 31e4b2540087
[NotSupportedException: This property or method is not supported for a Chartsheet]
OfficeOpenXml.ExcelWorksheet.get_Tables() +221
OfficeOpenXml.ExcelWorkbook.ReadAllTables() +144
OfficeOpenXml.ExcelWorksheet.get_Tables() +78
OfficeOpenXml.ExcelWorksheet.SaveTables() +60
OfficeOpenXml.ExcelWorksheet.Save() +303
OfficeOpenXml.ExcelWorkbook.Save() +715
OfficeOpenXml.ExcelPackage.GetAsByteArray(Boolean save) +39
Nothing has changed in my code. I just updated the EPPlus.dll via Nuget.
Here is a list of methods/commands that I am running against the ExcelPackage (pck) and ExcelWorksheet (wsTarget):
* pck.GetAsByteArray(); <-- this is where it bombs
* wsTarget.Cells[ca.Target.Range].LoadFromDataTable(ds.Tables[ca.Source.Name], ca.Source.CopyHeaders)
* wsTarget.HeaderFooter.FirstHeader.LeftAlignedText = ds.Tables[ca.Source.Name].Rows[0].ItemArray[0].ToString();
* wsTarget.HeaderFooter.EvenHeader.LeftAlignedText = ds.Tables[ca.Source.Name].Rows[0].ItemArray[0].ToString();
* wsTarget.HeaderFooter.OddHeader.LeftAlignedText = ds.Tables[ca.Source.Name].Rows[0].ItemArray[0].ToString();
* wsTarget.HeaderFooter.differentFirst = false;
* wsTarget.Cells[ca.Target.Range].Style.HorizontalAlignment = eha;
* wsTarget.Cells[ca.Target.Range].Style.Numberformat.Format = ca.Source.Format;
That's pretty much it. I don't do anything else with it and these are all pretty basic API calls, so I'm not sure why it will not work in the newer version.
I back rev'd to 3.1.3 so I'm fine for now, but I thought you might want to know there may be something going on.
Comments: Fixed in changeset 31e4b2540087