Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

FINERACT-2729: Accept .xlsx files in bulk import, not just legacy .xls - #6210

Merged
adamsaghy merged 1 commit into
apache:developfrom
foodeveloper:port/CBS-64-bulk-upload-xlsx-support
Aug 3, 2026
Merged

adamsaghy merged 1 commit into
apache:developfrom
foodeveloper:port/CBS-64-bulk-upload-xlsx-support

Conversation

@rymghosn

Copy link
Copy Markdown
Contributor

Bulk import validated the uploaded file's MIME type but only accepted the legacy Excel (.xls) format, rejecting valid OOXML (.xlsx) files such as those downloaded from Google Sheets. Additionally, the implementation always parsed uploaded files using HSSFWorkbook, which only supports the .xls format.

This change adds support for the OOXML spreadsheet MIME type and replaces the hardcoded HSSFWorkbook with WorkbookFactory.create(), allowing Apache POI to automatically detect and parse both .xls and .xlsx workbooks.

This PR : https://issues.apache.org/jira/browse/FINERACT-2729

Bulk import validated the uploaded file's detected MIME type but only
accepted legacy binary Excel formats, rejecting modern OOXML .xlsx
files (e.g. downloaded directly from Google Sheets). Even if that
check were relaxed, the code unconditionally parsed the stream with
HSSFWorkbook, which cannot read OOXML content.

Accept the OOXML spreadsheet MIME type alongside the existing checks,
and replace the hardcoded HSSFWorkbook with WorkbookFactory.create(),
which auto-detects the workbook format and supports both .xls and
.xlsx.

Signed-off-by: Rym.Ghosn <rym.ghosn@foo.mobi>

@adamsaghy adamsaghy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adamsaghy
adamsaghy merged commit 7b75c89 into apache:develop Aug 3, 2026
179 of 180 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants