Excel Pivot Table using Apache POI

Create an Excel Pivot table from Java using Apache POI.

“A foolish faith in authority is the worst enemy of truth.”
― Albert Einstein

1. Introduction

A Pivot Table is a tool used in Excel for summarizing data. It helps group data using user-selected criteria and compute group summaries using functions such as total, average, count, etc.

Continue reading “Excel Pivot Table using Apache POI”

Convert Excel to CSV (UTF-8)

Export data from Excel spreadsheet to CSV using Java. Properly handles exporting Unicode data in the spreadsheet.

1. Introduction

Let us look into how to convert Excel to CSV.

CSV stands for Comma-Separated-Values and is a very common format used for exchanging data between diverse applications. While the Excel Spreadsheet file format is complex (since it has to accommodate a lot more!), CSV is a simpler format representing just tabular data.

Continue reading “Convert Excel to CSV (UTF-8)”

Apache POI Excel Example – Part 2

More formatting options using Java with Apache POI for Microsoft Excel spreadsheets.

1. Introduction

In Part 1 of this Apache POI Excel guide, we examined how to create an Excel spreadsheet and add data to it. We also looked at properly storing data into cells to avoid “Number Stored as Text” errors.

In this chapter, let us look at some more options for formatting data within an Excel spreadsheet.

Continue reading “Apache POI Excel Example – Part 2”

Apache POI Excel Example

Learn how to create an Excel spreadsheet from within Java using Apache POI, a library for working with Microsoft Documents.

1. Introduction

Apache POI is a Java library to read and write Microsoft Documents including Word and Excel. Java Excel API can read and write Excel 97-2003 XLS files and also Excel 2007+ XLSX files. In this article, we show how to get going using the Apache POI library to work with Excel files.

Continue reading “Apache POI Excel Example”