XLSX ingest fails when first worksheet row has no spans attribute

Aperta Adatta ai principianti
#12,856 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@adityaanikam ci sta già lavorando.

Dal 28/10/2026.

  • #12860 di @adityaanikam — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
data

Direzione di ricerca

Inizia individuando XLSXFileReader e il codice che legge l’attributo spans della prima riga del foglio di lavoro. Verifica come il lettore gestisce l’assenza dell’attributo, poi trova ed esegui i test pertinenti per l’importazione XLSX. L’obiettivo è raggiunto quando un file XLSX altrimenti valido, privo di spans, viene importato correttamente e i test continuano a coprire il comportamento esistente dell’importazione XLSX.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Type: Bug

Dataverse 6.11 fails to ingest an otherwise valid XLSX file when the first worksheet row does not contain the optional spans attribute (file may have been exported?).

The original XLSX fails to ingest. Opening the same file in Microsoft Excel and saving it as a new XLSX causes it to ingest successfully. Saving it as CSV also works. The column names and data do not appear to be the problem.

Error

Null r attribute in the first row element!
Null spans attribute in the first row element!

Ingest failure (IO Exception): Could not parse Excel/XLSX spreadsheet.
Cannot invoke "String.indexOf(int)" because "spansAttribute" is null.

Cause

The original worksheet XML contains a first row like:

<row r="1">

It does not contain a spans attribute such as:

<row r="1" spans="1:12">

The spans attribute is optional in XLSX/SpreadsheetML. XLSXFileReader checks whether it is null but then calls spansAttribute.indexOf(':'), resulting in the exception.

Steps to reproduce

  • Create or upload an XLSX whose first worksheet row omits the spans attribute.
  • Upload it to a dataset and allow tabular ingest to run.
  • Observe that ingest fails with the exception above.
  • Open the same file in Microsoft Excel, save it as a new XLSX, and upload it again.
  • Observe that the rewritten XLSX ingests successfully.

Environment

Dataverse 6.11

I did look through open issues and I don't think this one is mentioned yet, but I could have missed it.

Lingua principale
Java
Stelle
1.1k
Fork
571
Merge medio
1g 17h
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IQSS/dataverse

Tutte le issue di IQSS/dataverse

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.