Can VBA Automate Excel Data from Picture OCR?
Question details
The user wants to automate Excel's Data from Picture OCR feature with VBA.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Recognize data from an image and insert it into a worksheet as part of a VBA workflow.
- Observed behavior
- The Macro Recorder does not produce standard VBA commands for the Data from Picture process.
Check whether Data > From Picture is available in your version of Excel and prepare a clear image of the table you want to import. If you plan to use an external OCR service, check its API requirements and data privacy policy.
Import the image manually with Excel Data from Picture
Use Excel's interface when you can review and insert the recognized data manually.
Excel's built-in Data from Picture feature does not currently expose a supported VBA method for direct automation. Avoid relying on undocumented internal commands.
In Excel, select Data > From Picture > Picture From File, then choose the image containing your data.
Inspect the results in the Data from Picture pane and correct any flagged values before importing.
Select Insert Data to place the reviewed results in the worksheet.

Connect VBA to a separate OCR API
Use an external OCR service or application when image processing must be automated.
Edit Excel-compatible spreadsheets with WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface and Excel format compatibility, making it easy to move spreadsheet work between applications. It does not provide a fix for automating Excel's built-in Data from Picture feature with VBA.

Frequently Asked Questions
Why doesn't the Macro Recorder capture Data from Picture?
The feature does not currently expose a supported VBA method for direct automation, so the recorder does not produce standard VBA commands for the OCR process.
Where can I find Data from Picture in Excel?
In supported versions of Excel, select Data > From Picture > Picture From File. Choose an image, review the recognized data, and select Insert Data.
How can I automate OCR for images in a VBA workflow?
Use a separate OCR service or application with an API. Your VBA macro can submit an image, parse the returned data, and write the results into worksheet cells according to the provider's documentation.
Can I request VBA support for Data from Picture?
Yes. In Excel, select Help and use the available feedback option to request VBA support for the feature.




