openxlsx2 icon indicating copy to clipboard operation
openxlsx2 copied to clipboard

Support workbooks with chart extension

Open JanMarvin opened this issue 2 years ago • 0 comments

In 2014 someone decided, that having charts[0-9].xml was not enough and introduced chartEx[0-9].xml. These are used with newer chart options in Excel like histograms and box whisker plots.

Unfortunately this breaks the current logic of how we handle charts. Previously we had a nice little data frame in wb$charts where every chart could have a style and a color xml file. When loading we read the chart, color and style into the data frame. This needed a fix, because we can have chart1.xml and chartEx1.xml, but they use color1.xml, color2.xml, and style1.xml and style2.xml. (Oh and ofc they have chartEx1.xml.rels but I assume you already guessed this).

In a PR I'm a about to push in a moment, I have circumvented this by adding new columns to our data frame (chartEx and relsEx). This allows reading and writing the example input.

What needs to be added though is cloning.

JanMarvin avatar Nov 27 '22 08:11 JanMarvin