Save Excel cell range as image with activeX
Show older comments
Hi! I have a nice formatted table in excel and would like to save this table (meaning a cell range) as jpg file using activeX with Matlab. Is that possible?
I do already have the following code
exl = actxserver('excel.application');
exlWkbk = exl.Workbooks;
exlFile = exlWkbk.Open('myFile.xlsx');
exlSheet1 = exlFile.Sheets.Item('Sheet1');
dat_range = 'A1:F19';
rngObj = exlSheet1.Range(dat_range);
Now I would nee something like rngObj.export('myExport.jpg') but I couldn't find anything....
1 Comment
Fangjun Jiang
on 17 Jul 2019
consider copying to clipboard
Accepted Answer
More Answers (1)
Fangjun Jiang
on 17 Jul 2019
0 votes
1 Comment
Guillaume
on 17 Jul 2019
Well spotted! The trouble is that this puts the image on the clipboard (as a metafile at that) and matlab is not really able to retrieve that (clipboard doesn't know how to read it)
Categories
Find more on Environment and Settings in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!