This step copies a chart from one Excel workbook to the same or another workbook.
This is useful when a chart needs to be moved from one worksheet to another or if it needs to be placed in a dynamic cell reference, e.g. at the end of a report (last cell + 1 in a column).
Step-by step guide
In this example, we will use the following Excel file containing internet browser market share data.
- Create a Multiple file manipulations action step.
- Add an instruction, selecting "Copy chart" from the list of available instructions under the Excel section:
- You will then need to configure the details for the instruction:
- Link an Excel file stored in a data step property in a SolveXia process as the source. In this example "Internet browsers.xlsx" is selected with worksheet "Statistics"
- Configure chart selection options:
- Select the worksheet where the chart is located.
- Select the chart either by chart name, title, or by index.
- Select whether to copy chart as a picture. If this option is not selected, then the chart will be copied as an Excel object and relative references will remain intact, i.e. the references will move with the chart if they are not absolute references.
Note that the chart name in this example is "Chart 1" the chart title is "Browser market share".
- Link an Excel file stored in a data step property in a SolveXia process and select the target worksheet and cell address. In this example, the target is the worksheet "Report" with cell address "B2".