How to Copy Excel Cells and Charts as a Picture Using Office Scripts
Question details
The user needs to automate copying a selected Excel range that contains both text and embedded charts as a picture, but the current Office Script omits the charts.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Automating the extraction of visual reports by copying an Excel cell range and its overlapping charts as a single image using Office Scripts.
- Observed behavior
- The Office Script successfully copies the cell range data and formatting, but embedded charts within that range are completely omitted from the resulting picture.
Ensure you have your current Office Scripts code saved and an active account on the Microsoft Power Platform Community forums to request targeted API workarounds.
Consult the Power Platform Community for Workarounds
Since Office Scripts may not natively support capturing embedded charts in a range image, consult community experts for alternative automation flows like Power Automate Desktop.
Office Scripts and Power Automate interact with Excel files differently than the desktop application. While desktop Excel easily copies ranges with overlapping charts as pictures natively, cloud-based scripts primarily target cell values and grid formatting, often ignoring floating chart objects.
Open your web browser and go to the official Microsoft Power Platform Community forums.
Use the search bar to look for queries like 'Office Scripts copy range as picture with charts' to see if a recent Graph API update or script workaround has been shared.
If no solution is found, create a new post detailing your script, the specific Excel version you are targeting, and the exact chart types being omitted.
Consider using Power Automate Desktop (RPA) as an alternative, which can mimic the manual user action of selecting a range and clicking 'Copy as Picture' directly in the Excel desktop app.

Easily Manage Spreadsheets and Charts with WPS Office
If you are frustrated by the limitations of cloud-based Office Scripts, try WPS Office. It provides a lightweight, free, and highly compatible desktop environment where copying combined ranges and charts as pictures works seamlessly.
- 1. Download WPS Office: Visit the official WPS Office website and download the free installation package.
- 2. Open Your Excel File: Launch WPS Spreadsheet and open your existing .xlsx document containing the charts and data.
- 3. Select and Copy: Highlight the desired cell range including the charts, right-click, and use the 'Copy as Picture' feature to capture everything perfectly.

Frequently Asked Questions
Why does my Office Script ignore charts when copying a range?
Office Scripts primarily interact with the spreadsheet grid (cell values and formatting). Extracting floating objects like embedded charts often requires different API calls that may not be fully supported by the standard range image extraction methods.
Can I use VBA instead of Office Scripts to copy charts as pictures?
Yes. If you are using desktop Excel, VBA easily handles this using the `Selection.CopyPicture` method, which captures both the cell grid and any overlapping chart objects exactly as they appear on screen.
Are there alternatives to Office Scripts for capturing Excel charts?
You can use Power Automate Desktop flows (RPA) to automate the desktop Excel application, or extract chart images individually using Microsoft Graph API endpoints.




