XLSX ingest fails when first worksheet row has no spans attribute

Abierto Apto para principiantes
#12,856 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@adityaanikam ya está trabajando en esto.

Desde el 28/10/2026.

  • #12860 de @adityaanikam — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java
Área
data

Línea de trabajo

Empieza por localizar XLSXFileReader y el código que lee el atributo spans de la primera fila de la hoja de cálculo. Comprueba cómo gestiona el lector el atributo cuando no está presente y, después, encuentra y ejecuta las pruebas pertinentes de ingestión de XLSX. El objetivo se cumple cuando se ingiere correctamente un XLSX válido en los demás aspectos que no tenga spans y las pruebas siguen cubriendo el comportamiento existente de ingestión de XLSX.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Java
Estrellas
1.1k
Forks
571
Merge medio
1 d 18 h
PR fusionados (30 d)
8

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de IQSS/dataverse

Todos los issues de IQSS/dataverse

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.