Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

How to write images to excel speadsheet from matlab?

Asked by Mini on 29 Dec 2012

Hi there

I was wondering if there's a way to insert rows and columns of images in a excel spreadsheet using matlab. Please help me out. Thank you!

Cheers!

0 Comments

Mini

Products

No products are associated with this question.

1 Answer

Answer by Image Analyst on 29 Dec 2012

There is no way to export an image from MATLAB to Excel, unless you do some very complicated ActiveX stuff. I put thumbnail images into Excel but I wrote a Visual Basic program to do it. My MATLAB function passes the workbook filename and the image filename to the VB program. The VB program then launches Excel and reads in the workbook, reads in the image file and creates a thumbnail of it, and then finally exports the thumbnail image onto the worksheet. You see an actual image displayed in Excel.

If you want to put just THE VALUES of the image into a workbook, then you can use xlswrite. You won't get an image in the workbook but you will get pixel values (integers or some other type of number) in the Excel cells.

You might also be interested in Steve Eddins's im2html(): http://blogs.mathworks.com/steve/2012/06/02/making-an-html-table-of-pixel-values-with-colored-cells/

0 Comments

Image Analyst

Contact us