Sign inSign up

t5750/poi

By t5750

•Updated over 4 years ago

Read the Docs for Apache POI

Image
1

1.1K

t5750/poi repository overview

⁠Apache POI

License PRs Welcome GitHub stars GitHub forks

⁠Docs

⁠Getting Started

Step 1: Download

git clone https://github.com/T5750/poi.git
cd poi

Step 2: Start Server

docker-compose up -d
# or
mvn clean spring-boot:run

http://localhost:8080/poi⁠

⁠Test
  • TestReadExcel, TestReadExcelDemo
  • TestExportExcel, TestExportExcel2007, TestWriteExcelDemo
  • TestTemplate, TestExcelReplace
  • CalendarDemo
  • TestExcelFormulaDemo, TestExcelStylingDemo, TestAll
⁠Runtime Environment
⁠Classes
  1. HSSF, XSSF and XSSF classes

Apache POI main classes usually start with either HSSF, XSSF or SXSSF.

  • HSSF – is the POI Project’s pure Java implementation of the Excel ’97(-2007) file format. e.g. HSSFWorkbook⁠, HSSFSheet⁠.
  • XSSF – is the POI Project’s pure Java implementation of the Excel 2007 OOXML (.xlsx) file format. e.g. XSSFWorkbook⁠, XSSFSheet⁠.
  • SXSSF (since 3.8-beta3) – is an API-compatible streaming extension of XSSF to be used when very large spreadsheets have to be produced, and heap space is limited. e.g. SXSSFWorkbook⁠, SXSSFSheet⁠. SXSSF achieves its low memory footprint by limiting access to the rows that are within a sliding window, while XSSF gives access to all rows in the document.
  1. Row and Cell

Apart from above classes, Row⁠ and Cell⁠ are used to interact with a particular row and a particular cell in excel sheet.

  1. Style Classes

A wide range of classes like CellStyle⁠, BuiltinFormats⁠, ComparisonOperator⁠, ConditionalFormattingRule⁠, FontFormatting⁠, IndexedColors⁠, PatternFormatting⁠, SheetConditionalFormatting⁠ etc. are used when you have to add formatting in a sheet, mostly based on some rules.

  1. FormulaEvaluator

Another useful class FormulaEvaluator is used to evaluate the formula cells in excel sheet.

⁠Write an excel file
  1. Create a workbook
  2. Create a sheet in workbook
  3. Create a row in sheet
  4. Add cells in sheet
  5. Repeat step 3 and 4 to write more data
⁠Read an excel file
  1. Create workbook instance from excel sheet
  2. Get to the desired sheet
  3. Increment row number
  4. iterate over all cells in a row
  5. repeat step 3 and 4 until all data is read

⁠Getting Help

Having trouble with T5750's POI? We’d like to help!

⁠Branch

View servlet branch at https://github.com/T5750/poi/tree/servlet⁠.

⁠References

⁠License

This project is Open Source software released under the Apache 2.0 license⁠.

Tag summary

Content type

Image

Digest

sha256:4cf615e33…

Size

277.5 MB

Last updated

over 4 years ago

docker pull t5750/poi