I'm using ClosedXML to change the values of some cells in a XLSX file. These cells are used to generate a chart on another sheet.
I'm not touching the chart at all with ClosedXML. In fact, I'm not even touching the sheet that contains it, I'm just changing the values of some data cells, like this:
var workbook = new XLWorkbook(@"C:\path\to\my\file.xlsx");
var dataWorksheet = workbook.Worksheet("data");
var cell = dataWorksheet.Cell(1, 2);
cell.Value = 30;
workbook.Save();
However, when I re-open the file in Excel, the chart that was on the other sheet (which I haven't touched at all) simply disappears, leaving the sheet empty.
I know ClosedXML doesn't support the CREATION of charts, but is there a way to avoid LOSING them when saving?