Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public enum Workbook.Format

  1. Object
  2. Enum<Workbook.Format>
  3. Workbook.Format

ImplementsComparable<Workbook.Format>

A file format a workbook is read from or written to.

Enum constants

XLSXExcel’s format, a zip of XML parts.
ODSThe OpenDocument spreadsheet LibreOffice and others write.
CSVText with a comma, or another separator that is detected, between values.
TSVText with a tab between values.

Methods

public static Workbook.Format[] values()
public static Workbook.Format valueOf(String name)
public static Workbook.Format detect(String fileName, byte[] head)Tells the format of a file from its name and its first bytes.

Inherited methods

Enum constant details

XLSX

XLSX
Excel’s format, a zip of XML parts.

ODS

ODS
The OpenDocument spreadsheet LibreOffice and others write.

CSV

CSV
Text with a comma, or another separator that is detected, between values. One sheet, values only.

TSV

TSV
Text with a tab between values.

Method details

values

public static Workbook.Format[] values()

valueOf

public static Workbook.Format valueOf(String name)

detect

public static Workbook.Format detect(String fileName, byte[] head)
Tells the format of a file from its name and its first bytes. The content wins: a zip archive is a spreadsheet whatever the file is called.

Parameters

fileName String
the name of the file, may be null
head byte[]
the first bytes of the file, as many as are at hand; may be null

Returns

the format, CSV when nothing says otherwise