Save Excel cell range as image with activeX
Afficher commentaires plus anciens
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 commentaire
Fangjun Jiang
le 17 Juil 2019
consider copying to clipboard
Réponse acceptée
Plus de réponses (1)
Fangjun Jiang
le 17 Juil 2019
0 votes
1 commentaire
Guillaume
le 17 Juil 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)
Catégories
En savoir plus sur Environment and Settings dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!