{"id":24316517,"url":"https://github.com/jferard/fastods","last_synced_at":"2025-06-20T23:06:01.972Z","repository":{"id":44709156,"uuid":"59571413","full_name":"jferard/fastods","owner":"jferard","description":"A very fast and lightweight (no dependency) library for creating ODS (Open Document Spreadsheet, mainly for Calc) files in Java. It's a Martin Schulz's SimpleODS fork","archived":false,"fork":false,"pushed_at":"2024-12-07T19:31:34.000Z","size":5103,"stargazers_count":39,"open_issues_count":13,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-08T17:06:47.918Z","etag":null,"topics":["calc","java","libreoffice","no-dependencies","od-files","ods","opendocument","speed","spreadsheet"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jferard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-24T12:30:26.000Z","updated_at":"2025-02-24T18:34:32.000Z","dependencies_parsed_at":"2025-01-17T12:57:25.786Z","dependency_job_id":"9c114e12-f798-41f5-9c31-1239a790f9b8","html_url":"https://github.com/jferard/fastods","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/jferard/fastods","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferard%2Ffastods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferard%2Ffastods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferard%2Ffastods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferard%2Ffastods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jferard","download_url":"https://codeload.github.com/jferard/fastods/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferard%2Ffastods/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261032034,"owners_count":23100047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calc","java","libreoffice","no-dependencies","od-files","ods","opendocument","speed","spreadsheet"],"created_at":"2025-01-17T12:56:43.804Z","updated_at":"2025-06-20T23:05:56.953Z","avatar_url":"https://github.com/jferard.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![FastODS](https://github.com/jferard/fastods/actions/workflows/workflow.yml/badge.svg)](https://github.com/jferard/fastods/actions/workflows/workflow.yml)\r\n[![Code Coverage](https://img.shields.io/codecov/c/github/jferard/fastods/master.svg)](https://codecov.io/github/jferard/fastods?branch=master)\r\n\r\n# FastODS\r\n(C) J. Férard 2016-2023\r\n\r\n(C) M. Schulz 2008-2013 for SimpleODS\r\n\r\nA very fast and lightweight (no dependency) library for creating ODS (Open Document Spreadsheet, mainly for Calc) files in Java. It's a Martin Schulz's SimpleODS fork.\r\n\r\n## TLDR;\r\n* FastODS is compatible with Java 8 or any later version and OpenDocument v1.2 (actually, documents are 1.3 valid but tagged \"1.2\").\r\n* **FastODS cannot read ODS documents;** \r\n* FastODS can produce complex and large ODS documents *very* fast;\r\n* FastODS is almost ready for production use. The version 1.0 is coming;\r\n* There is a little [tutorial](https://github.com/jferard/fastods/wiki/Tutorial) that covers most of the features of FastODS;\r\n* All documents produced in the tutorial are validated against OpenDocument RELAX NG schemas; \r\n* Important: [feel free to ask a question or make a suggestion](https://github.com/jferard/fastods/issues/new);\r\n\r\n### Features\r\n* Cell styles, content formatting (dates, numbers, ...), formulas; \r\n* Page formatting (header, footer);\r\n* Document embedding, images;\r\n* Filters \u0026 Autofilters;\r\n* Pivot Tables (Data Pilot);\r\n* Easy export of SQL ResultSets;\r\n* Support for Macros, events;\r\n* Document encryption (AES).\r\n\r\n### Examples\r\n\r\nHere's what some of the produced documents in the tutorial look like:\r\n\r\nA regular table (export of a SQL ResultSet):  \r\n  ![Periodic Table List of elements](https://raw.githubusercontent.com/wiki/jferard/fastods/images/capture_periodic_table.png)\r\n  \r\nA multiplication table:  \r\n  ![Multiplication Table](https://raw.githubusercontent.com/wiki/jferard/fastods/images/i_multiplication_table.png)\r\n  \r\nThe periodic table of Mr. Dmitri Mendeleev:  \r\n  ![Periodic Table](https://raw.githubusercontent.com/wiki/jferard/fastods/images/j_periodic_table.png) \r\n\r\n## Table of contents\r\n* [Why FastODS?](#why-fastods)\r\n* [Limitations](#limitations)\r\n* [Installation](#installation)\r\n* [Examples](#examples)\r\n* [Documentation](#documentation)\r\n* [Speed](#speed)\r\n* [History](#history)\r\n\r\n## Why FastODS?\r\nBecause I need to write big and simple ODS files very fast in Java.\r\n\r\nThere are some very good libraries for [OASIS Open Document Format](https://www.oasis-open.org/standards#opendocumentv1.2), like [Simple ODF](http://incubator.apache.org/odftoolkit/simple/) or [JOpenDocument](http://www.jopendocument.org/), but they are a little bit slow and cumberstone for only writing **very simple** spreadsheets.\r\nThere is a simple and fast library by Martin Schulz, [Simple ODS](http://simpleods.sourceforge.net/), but it is now discontinued, outdated (Java 1.3), has a few limitations (incorrect handling of UTF-8 encoding, missing XML escaping for attributes), etc.\r\n\r\nFastODS is a fork of SimpleODS that aims to be a very fast ODS writing library in Java. A lot of \r\nfeatures have been added.\r\n\r\n(Thanks to M. Schultz for his work.)\r\n\r\n## Limitations\r\nFastODS won't deal with odt, odg, odf, or other od_ files.\r\nIt won't even *read* ods files.\r\nBecause it doesn't use XML internally, but only for writing files. That's why it is fast and lightweight.\r\n\r\nIt's an *OpenDocument producer* (*Open Document Format for Office Applications (OpenDocument) Version 1.2*, 2.3.1) and only an *OpenDocument producer*:\r\n\u003e An *OpenDocument producer* is a program that creates at least one conforming OpenDocument document  \r\n\r\n### FastODS documents and LibreOffice/OpenOffice/Excel/...\r\nWhile an *OpenDocument producer* like FastODS can be reasonably simple because it just has to focus on the creation of OpenDocument files, \r\n*OpenDocument consumer*s like LibreOffice, OpenOffice, Excel, ... are expected to handle numerous files created by various producers and are therefore more complex. \r\nAlthough the spec states that a producer has to:\r\n\r\n\u003e parse and interpret OpenDocument documents according to the semantics defined by this specification [...] *but it need not interpret the semantics of all elements, attributes and attribute values.* (emphasis mine)\r\n\r\nwe expect those applications to open almost every proper OpenDocument file. But that's not so easy, because LibreOffice, OpenOffice, Excel, ... *do not* understand some tags, attributes or attribute values.\r\n\r\nTo be pragmatic, I chose to consider LibreOffice as the reference implementation. Hence **the documents created by FastODS should be fully understood by LibreOffice** (whereas there is a specific option to disable this enforced compatibility and to produce files that are slightly more concise). \r\n**There is no plan to adapt the documents created by FastODS to OpenOffice, Excel or another reader**, although it will be done if possible (your help is welcome).\r\n\r\n## Platforms and dependencies\r\nFastODS has no runtime dependency beyond the standard Java Library version 6 or higher. Even the XML code is manually produced.\r\n\r\nHowever, specific modules like `fastods-crypto` and `fastods-extra` have dependencies, but those are usually not needed.\r\n\r\nFastODS works on Android (tested on *Android 9 Pie*, see [this issue](https://github.com/jferard/fastods/issues/180)).\r\n\r\n## Installation\r\n### Standard\r\nAdd the following dependency to your POM:\r\n```\r\n\u003cdependency\u003e\r\n\t\t\u003cgroupId\u003ecom.github.jferard\u003c/groupId\u003e\r\n\t\t\u003cartifactId\u003efastods\u003c/artifactId\u003e\r\n\t\t\u003cversion\u003e0.8.1\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\n### From sources\r\nFor the latest version, type the following command:\r\n\r\n`git clone https://github.com/jferard/fastods.git`\r\n\r\nThen:\r\n\r\n`mvn clean install`\r\n\r\nAnd add the following dependency to your POM:\r\n\r\n```\r\n\u003cdependency\u003e\r\n\t\t\u003cgroupId\u003ecom.github.jferard\u003c/groupId\u003e\r\n\t\t\u003cartifactId\u003efastods\u003c/artifactId\u003e\r\n\t\t\u003cversion\u003e0.8.2-SNAPSHOT\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\n### From jar\r\nFirst download the **jar file** from the latest [release](https://github.com/jferard/fastods/releases/).\r\n\r\nThen run the following command to install the jar in your local repo:\r\n\r\n```mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=fastods-\u003cversion\u003e.jar```\r\n\r\n\r\n## Examples\r\n### Basic example\r\nTaken from the tutorial:\r\n\r\n```java\r\nfinal OdsFactory odsFactory = OdsFactory.create(Logger.getLogger(\"hello-world\"), Locale.US);\r\nfinal AnonymousOdsFileWriter writer = odsFactory.createWriter();\r\nfinal OdsDocument document = writer.document();\r\nfinal Table table = document.addTable(\"hello-world\");\r\nfinal TableRowImpl row = table.getRow(0);\r\nfinal TableCell cell = row.getOrCreateCell(0);\r\ncell.setStringValue(\"Hello, world!\");\r\nwriter.saveAs(new File(\"generated_files\", \"readme_example.ods\"));\r\n```\r\n\r\n## Documentation\r\nWriting a full documentation would be a considerable work, because every time you change the\r\nlibrary, you have to rewrite the doc.\r\n\r\nMy idea is to provide a set of examples of the features of FastODS. This is ensures that the doc is up to date.\r\n\r\nThose examples are located in [the examples module](https://github.com/jferard/fastods/tree/master/fastods-examples/src/main/java/com/github/jferard/fastods/examples) and are fully commented.\r\nA [tutorial](https://github.com/jferard/fastods/wiki/Tutorial) was extracted from this examples.\r\n\r\nTo run those examples, one has to run:\r\n\r\n```mvn verify```\r\n\r\nThe resulting ods files are written in `generated_files` directory, and can be opened with LibreOffice or OpenOffice.\r\n\r\n(**Note: All documents produced in the tutorial are validated against [OpenDocument RELAX NG schemas](http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html).** This is done by the `odfvalidator` from OdfToolkit.)\r\n\r\n### Other examples\r\nOther examples are implemented as integration tests: ```OdsFileCreationIT.java```, ```OdsFileWithHeaderAndFooterCreationIT.java```, etc.\r\n\r\nTo run those examples, one has to run:\r\n\r\n```mvn verify```\r\n\r\nThe resulting ods files are written in `generated_files` directory, and can be opened with LibreOffice or OpenOffice.\r\nSee [the integration tests directory](https://github.com/jferard/fastods/tree/master/fastods/src/test/java/com/github/jferard/fastods/it)\r\n\r\n\r\n## Speed\r\nLet's be concrete : FastODS is approximately twice as fast as SimpleODS and ten times faster than JOpenDocument for writing large ODS files. (SimpleODF is clearly not the right tool to write large ODS files.)\r\n\r\nFor more details, see https://github.com/jferard/fastods/wiki/Benchmarking-and-profiling.\r\n\r\n## History\r\nSee https://github.com/jferard/fastods/releases\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjferard%2Ffastods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjferard%2Ffastods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjferard%2Ffastods/lists"}