Giter VIP home page Giter VIP logo

poi-shared-strings's Introduction

Build Status Maven Central

poi-shared-strings

Memory efficient Shared Strings Table implementation for POI xlsx streaming.

Supports read and write use cases when used with POI 5.x. poi-shared-strings 1.x supports POI 4.x.

https://bz.apache.org/bugzilla/show_bug.cgi?id=61832

The TempFileSharedStringsTable uses a H2 MVStore to store the Excel Shared String data. The MVStore data can be encrypted using a generated password.

This class can be used instead of the POI SharedStringsTable and ReadOnlySharedStringsTable. It is only useful if you expect to need to support large numbers of shared string entries.

Usage

When reading files, use new TempFileSharedStringsTable(opcPackage, true) to have the shared strings loaded from the xlsx package.

If you are using the TempFileSharedStringsTable when writing files (eg using SXSSFWorkbook), then use new TempFileSharedStringsTable(true) to create an empty table that you can add shared string entries to.

Comments Table

v2.0.2 added support for TempFileCommentsTable which works in a similar way to TempFileSharedStringsTable.

Up until v2.4.0, TempFileCommentsTable only supported read use cases. With v2.4.0, it can now be used with SXSSFWorkbook like TempFileSharedStringsTable can.

This class can be used instead of the POI CommentsTable. It is only useful if you expect to need to support large numbers of comments entries.

Full Format

v2.1.0 added support for parsing the shared strings and comments and keeping the formatting the data. This is optional and not enabled by default. This support requires a little extra memory. The default is to just extract the text of the shared strings and comments. Full Format support may not work when the files are in Strict OOXML format (POI Issue).

The current implementation of Full Format can be a lot slower than the plain text solution due to the extra XML parsing overhead.

Map-Backed implementations

Since v2.5.0, you can now avoid using temp files by using Map-backed implementations.

  • MapBackedSharedStringsTable
  • MapBackedCommentsTable

Samples

There is an xlsx reading sample and also an xlsx writing sample at https://github.com/pjfanning/poi-shared-strings-sample.

poi-shared-strings's People

Contributors

dependabot[bot] avatar pjfanning avatar stanbertrand avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.