Print data to HTML-code

Print data (structures, cells, arrays, ...) to HTML-code.

You are now following this Submission

This function writes data in a structured way so that it can be viewed in a html-browser. It can also be imported by word, excel and other programs so that it can be used easily elsewhere.

To use it :
print2html(s,nrecurs,f)
s data (structure, cells, other MATLAB data)
nrecurs : recursive display of cell- and structure elements
f : file (filename or filehandle)

If (and only if) a filename is given a html-head (<html>....</head><body>) and html-end is added.

The main goal of this function is not writing full html-code, but html-code which can be imported in larger files.

Cite As

Stijn Helsen (2026). Print data to HTML-code (https://www.mathworks.com/matlabcentral/fileexchange/2928-print-data-to-html-code), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

Request from Ralph for direct link to matlab-web. (Wasn't possible in Matlab5.2, so I didn't do it, and I'm sometimes still using this version.)