0

I have a Matlab WebApp deployed on which I want to build an excel file with 3 different sheets that have ["Input Data", "Matlab Plots", "Export Data"]. On the "Input data" sheet, I save all the input parameters from Matlab Webapp. On the "Matlab plots" sheet, I save all the images from the WebApp plots. "Export Data" sheet has a list of coordinates X,Y,Z based on a certain no. of points.

I need to create this excel without the actxserver('Excel.Application') method as I don't have an available excel installation on the server... Is it possible with writeTable() or other methods to import the images into excel?

I would appreciate an idea on how to export string data and image data in one bundle file...

Thank you in advance!

  • You can write the data to alternative formats such as CSV for sure. Images can be exported as image files (PNG, PDF, EPS, ...) and the two can then be "bundled" as zip-file for instance. Writing text data to xls(x) files without an excel license available might be possible, writing images as well could be more difficult. I'm no expert in Excel, so I'd suggest simply to try it out and see whether it works – Adriaan Apr 07 '22 at 14:03
  • Thank you for your comment, after some searching, I found the right approach. I am creating a template xlsx file, unzipping it and change the xml files inside. After I rebuild the xml files the file entire file structure is arhived again and changed to format xlsx instead of zip (for more info: https://stackoverflow.com/questions/11082278/how-to-properly-assemble-a-valid-xlsx-file-from-its-internal-sub-components) – Gabriel Daniliuc Apr 08 '22 at 05:42
  • You're welcome to [add your own answer](https://stackoverflow.com/help/self-answer) to the post, rather than putting it in a comment. That's even encouraged on Stack Overflow! – Adriaan Apr 08 '22 at 05:45

1 Answers1

0

I found a solution to build the xlsx file from scratch without excel installed. I decompose(unzip) a template xlsx file and then change the images inside of the new folder structure, the data and so on. After this, the folder structure with xml files is rebuilt as a zip arhive and changed to xlsx format. Phew :) More info on: How to properly assemble a valid xlsx file from its internal sub-components?