Open lognaturel opened 2 years ago
From the original thread, this comment has an example file PRUEBA.xlsx which seems corrupted somehow. I can open it with Excel (2010) or LibreOffice (7.2.7.2) but has excessive style / format data. It is 674KB on disk, and approx. 85% of that is from the ./xl/styles.xml
document within the xlsx zip file. After opening the file, there are dozens of hyperlink (Hipervínculo
) custom formats. Opening the file with openpyxl (with read_only
and data_only
modes) takes about 45 seconds on my machine. For this kind of file, perhaps pyxform could have a file read timeout kwarg (in xls2xform_convert
) to optionally limit resource usage when pyxform is used in a server / service context?
From the original thread, this comment also has an example file PRUEBA.xlsx which also seems corrupted. I can open it with Excel (2010) or LibreOffice (7.2.7.2) but has excessive style / format data, as described above. The file won't open with openpyxl, instead an error relating to the workbook style data is thrown, as copied below. For this kind of file, perhaps pyxform could catch the error and in the warning, suggest that the user re-save the file with Excel or try copying the XLSForm data into a new workbook file? Alternatively, perhaps this is a known issue for openpyxl or could be fixed upstream there.
ODK forum thread.
Manually copying the contents of the file and saving them in a new document worked.
Related to https://github.com/XLSForm/pyxform/issues/604 in that these document compatibility issues come from
openpyxl
.