Class HtmlOptions

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

public final class HtmlOptions extends Object
Options for 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Options for the default shape: the package, a document plus its _files directory.
    boolean
    Whether 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HtmlOptions

      public HtmlOptions()
  • Method Details

    • create

      public static HtmlOptions create()
      Options for the default shape: the package, a document plus its _files directory.
      Returns:
      new options
    • singleFile

      public HtmlOptions singleFile(boolean singleFile)
      Chooses one self-contained document (true) instead of the package: every sheet in one file, every image inlined.
      Parameters:
      singleFile - true for 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.