Class HtmlOptions
Workbook.saveHtml(path, options): choose between the
HTML package and one self-contained document.
HTML has two output shapes and this type picks between them.
The package (default for a path). report.html plus a
report_files/ directory beside it holding one page per sheet
(sheetNNN.htm), the shared stylesheet.css, the sheet tab
strip tabstrip.htm, one file per distinct embedded image
(imageNNN.<ext>, keeping the image's own format) and the
filelist.xml manifest. Sheet pages are numbered from
sheet001.htm, images from image000. That is the shape Excel's own Save as
Web Page writes, and the one every tool that consumes exported
spreadsheet HTML expects: without it a multi-sheet workbook has no way to
reach sheets 2 to n.
The single document. One self-contained file with every sheet in
it and every image inlined as a data: URI. Nothing gets lost when
the page is mailed, embedded or served from memory. This is what
Workbook.saveBytes("html") always produces, since a byte sink has
nowhere to put a second file.
Workbook.save(path) on a .html/.htm name writes
the package; call saveHtml with singleFile(boolean) for
the other shape.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HtmlOptionscreate()Options for the default shape: the package, a document plus its_filesdirectory.booleanWhether one self-contained document is written instead of the package.singleFile(boolean singleFile) Chooses one self-contained document (true) instead of the package: every sheet in one file, every image inlined.
-
Constructor Details
-
HtmlOptions
public HtmlOptions()
-
-
Method Details
-
create
Options for the default shape: the package, a document plus its_filesdirectory.- Returns:
- new options
-
singleFile
Chooses one self-contained document (true) instead of the package: every sheet in one file, every image inlined.- Parameters:
singleFile-truefor one document;false, the default, for the package- Returns:
- these options
-
singleFile
public boolean singleFile()Whether one self-contained document is written instead of the package.
-