Skip to content

bld-commons/dev-excel

Repository files navigation

dev-excel

In this project 2 libraries were created in order to speed up and make easier the generation and reading of excel files through the library apache-poi. The 2 libraries are:

  1. generator-excel
  2. read-excel

The main classes to start developing the generator-excel library are:

  1. ReportExcel is the entity from which the excel file will be generated.
  2. BaseSheet is the class that represents the Excel sheet, it is extended from:
    • SheetData
    • SheetSummary
    • MergeSheet
  3. RowSheet is the entity that reprents the row of the sheet
  4. In the package "bld.generator.report.excel.annotation" there are the annotations to configure the sheet layout, the most important annotations are:
    • ExcelHeaderLayout
    • ExcelSheetLayout
    • ExcelColumn
    • ExcelCellLayout

It generates sheets with the following functionalities:

  1. Functions(sum by column and row).
  2. Charts.
  3. It merges cells between rows when they are equals if the option "notMerge" is disabled in the annotation "ExcelSheetLayout".
  4. To get rows list through a query by the annotation "ExcelQuery" and the "QuerySheetData" entity type.

For the complete documnetation of the generator-excel library, click on the following link:

The main classes to start developing the read-excel library are:

  1. ExcelRead is the object that represents the excel file.
  2. SheetRead is the object that represents the excel sheet.
  3. RowSheetRead is impletened for creating an object that represents the rows of the sheet.
  4. In the package "bld.read.report.excel.annotation" there are the annotations to map the entities with the sheets an columns of the excel file.

For the complete documnetation of the read-excel library, click on the following link:

Below is a summary table with the features of the functions for generating excel files within class GeneateExcel.

HSSF XSSF SXSSF
Function createFileXls createFileXlsx createBigDataFileXlsx
CPU and memory efficiency Varies varies Good
Read Files Yes Yes No
Write Files Yes Yes Yes
Create sheets/rows/cells Yes Yes Yes
Delete sheets/rows/cells Yes Yes No
Styling cells Yes Yes Yes
Shift rows Yes Yes No
Cloning sheets Yes Yes No
Formula evaluation Yes Yes No
Cell comments Yes Yes No
Picture Yes Yes No

About

Generate excel from an object list

Resources

Stars

Watchers

Forks

Packages

No packages published