VBA & Macro Problems

How to Copy Excel Cells and Charts as a Picture Using Office Scripts

Kushani NimanthikaKushani Nimanthika Oct 16, 2026 871 views

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.

How to Copy Excel Cells and Charts as a Picture Using Office Scripts
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.
Before you start

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.

Solution 1Recommended

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.

1
Navigate to the Power Platform Community

Open your web browser and go to the official Microsoft Power Platform Community forums.

2
Search for Existing Workarounds

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.

3
Post Your Specific Scenario

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.

4
Explore Desktop Flows

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.

Consult the Power Platform Community for Workarounds
Cloud vs. Desktop Automation: Web-based Office Scripts have known limitations with floating objects like charts compared to traditional VBA macros running on a local desktop environment.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS Office website and download the free installation package.
  2. 2. Open Your Excel File: Launch WPS Spreadsheet and open your existing .xlsx document containing the charts and data.
  3. 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.
Free and lightweight alternative to Microsoft Excel.High compatibility with Microsoft Office formats, including XLSX and XLS.Built-in robust tools for effortlessly copying cell ranges and embedded charts as high-quality pictures.Familiar user interface ensuring seamless migration with zero learning curve.
microsoft office alternative - wps office

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.