Skip to content

Fixed XLSX ingest when the first row has no spans attribute - #12860

Open
adityaanikam wants to merge 1 commit into
IQSS:developfrom
adityaanikam:12856-xlsx-missing-spans
Open

adityaanikam wants to merge 1 commit into
IQSS:developfrom
adityaanikam:12856-xlsx-missing-spans

Conversation

@adityaanikam

Copy link
Copy Markdown

What this PR does / why we need it:

Ingest of an XLSX file failed with a NullPointerException when the first row of the worksheet has no spans attribute, which is optional in SpreadsheetML. The reader only used spans to get the number of columns. When it is missing, the number of columns is now the highest cell position found in the first row.

Which issue(s) this PR closes:

Special notes for your reviewer:

I counted the cells of the first row instead of reading the dimension element of the sheet, because dimension is optional too. Files that have spans go through the same code as before.

Suggestions on how to test this:

Run XLSXFileReaderTest. It builds a small XLSX in memory, with and without spans on the first row. The test without spans fails on develop. To try it by hand, upload an XLSX whose first row looks like <row r="1"> and let ingest run.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No.

Is there a release notes update needed for this change?:

Yes, a snippet is included.

Additional documentation:

None.

Copilot AI balanced review requested due to automatic review settings October 28, 2026 18:23

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@pdurbin pdurbin moved this to Ready for Triage in IQSS Dataverse Project Oct 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for Triage

Development

Successfully merging this pull request may close these issues.

XLSX ingest fails when first worksheet row has no spans attribute

3 participants