TREB logo (a leaf)

File Types

TREB can read (and write) XLSX and CSV files, in addition to its native file format (TREB files).

For most purposes, it’s best to use the native file format when you embed a spreadsheet on a webpage. Reading XLSX files is really calculation-intensive, and can be slow. CSV files don’t include any formatting or number formats.

TREB files

TREB files are simple JSON files (open one up to see the file structure). They are encoded in plain text, and there’s some redundancy in the structure, but we can rely on webservers to compress them when they are served so the network file size will generally be pretty small (especially compared to XLSX).

The actual JSON structure is still a little bit in flux, but files are versioned when they are saved so we can always read older files.

Converting files

The easiest way to convert an existing file to a TREB file is to use the editor on this website. You can load files from your desktop and they will be converted automatically. Then you can save the converted file back to your desktop as a TREB file.

You can also call the API function LoadLocalFile on any instance of a spreadsheet to load a desktop file, and SaveLocalFile to save.

If you run across a function that’s missing in our function library when converting an XLSX file, please let us know.

Every spreadsheet also has a button in the sidebar to save the current document as an XLSX file.