Intro
Any chart that references a range with data markers will have its data source updated when ExcelTemplate imports rows of data. Make changes to a template without making any changes to code.Open the template, right click on the chart and choose the "Select Data..." option. This will open a window with details about the charts data range. Though the range for the chart is only one row (=ChartSheet!$A$26:$B$26), will update the data formula when the data is bound to the data markers in the cells.
A populated version of the chart is available for download below.
Code
Downloads
- Template: ChartDemoTemplate.xlsx
- Output:ChartDemo_output.xlsx
- Sample Data: ChartDemoData.csv