I'm having an issue where I have some code that opens an existing Excel file, adds some data then saves the file. When this runs all the charts in the original Excel file disappear.
I have tested it and even if I just open the Excel file and save it without making any changes the charts are gone.
I can't upload Excel files here but I have attached a screenshot of the before / after.
Example code
var xlsxFormatProvider = new XlsxFormatProvider();
// Import
using Stream input = new FileStream("c:\\tmp\\Charts.xlsx", FileMode.Open);
var workbook = xlsxFormatProvider.Import(input);
// Export
using Stream output = new FileStream("c:\\tmp\\Charts_Edited.xlsx", FileMode.Create);
xlsxFormatProvider.Export(workbook, output);
Thanks,
Richard