Class HtmlOptions

java.lang.Object
io.keikai.axyra.sheets.io.HtmlOptions

public final class HtmlOptions extends Object
Options for Workbook.saveHtml(path, options).

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 image (imageNNN.png) and the filelist.xml manifest. 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..n.

The single document. One self-contained file with every sheet in it and every image inlined as a data: URI — nothing to lose track of 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 Details

    • HtmlOptions

      public HtmlOptions()
  • Method Details

    • create

      public static HtmlOptions create()
    • singleFile

      public HtmlOptions singleFile(boolean singleFile)
      Write one self-contained document instead of the package: every sheet in one file, every image inlined.
    • singleFile

      public boolean singleFile()