update_chart_data
Update an existing Word chart's data in place: preserves formatting, keeps rendering and Edit Data in sync, and validates the change before saving.
Instructions
Replace the data of an existing bar/column/line/pie/scatter chart in place (chart_index from list_charts): literal caches, range formulas, and the embedded workbook are rewritten together, so rendering and Edit Data stay in sync; formatting and styles are preserved. data takes the same shapes as add_chart and must keep the existing series COUNT (point count may change); series_names renames. Refused with the reason named: chartex/modern, combo, 3D/area/doughnut/radar/surface/stock/bubble, multi-level categories, series-count changes, ragged data. Auto-backup: prev/anchor slots in .ks4w-backups (backup=False skips rotation only); atomic validated save. Refuses documents open in Word.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| backup | No | ||
| file_path | Yes | ||
| chart_index | Yes | ||
| series_names | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||