New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export to spreadsheet creates an xlsx file with errors when exporting empty tables/layers #42945
Comments
@kobusburger gpkg datasource is missing in your zip |
Apologies
Kobus Burger
+27 83 228 9674
…On Mon, 26 Apr 2021 at 11:44, Giovanni Manghi ***@***.***> wrote:
*Additional context*
Export error test.zip
<https://github.com/qgis/QGIS/files/6375043/Export.error.test.zip>
@kobusburger <https://github.com/kobusburger> gpkg datasource is missing
in your zip
[image: Screenshot_20210426_104254]
<https://user-images.githubusercontent.com/1951107/116062879-3c22c800-a67c-11eb-8acc-ad684967a00e.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42945 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPZJ7BWAQI6TUZAZI33MCDTKUYV7ANCNFSM43SJOQGA>
.
|
Export error test.zip |
@kobusburger output opens fine in LibreOffice Calc, cannot test on Excel as I don't own any copy of MS Office. |
Also note that "Export to spreadsheet" sometimes does not export all the selected layers (depending on the selection). This can confirmed by opening the xlsx in 7-Zip. |
I can confirm the bug with test dataset in Excel 365 on Windows 10 x64. The bug seems somehow related with exporting empty tables.
If I add a row to the empty table the bug also dissapears. |
Still valid on QGIS 3.22.4 and 3.24.0. Tested with both "MS Office Excel" and "LibreOffice Calc". |
@rouault does this ring a bell for you? |
Could someone confirm that test.xlsx can be opened fine with Excel 365 / MS office ? |
@rouault I tried to open it using Office 2016 and it opens fine. |
XLSX: do not write empty <cols> element on empty layers, and change heuristics to detect 'default' empty layers from intended empty ones (fixes qgis/QGIS#42945)
…euristics to detect 'default' empty layers from intended empty ones (fixes qgis/QGIS#42945)
[Backport release/3.7] XLSX: do not write empty <cols> element on empty layers, and change heuristics to detect 'default' empty layers from intended empty ones (fixes qgis/QGIS#42945)
Describe the bug
The "Export to spreadsheet" algorithm creates an xlsx file with errors depending in the layers that are selected. Some layers do not create the error and others do. The errors can be verified the attached files:
Export test.qgz
Export test.gpkg
error107520_04.xml
Export test.xlsx
How to Reproduce
QGIS and OS versions
Additional context
Export error test.zip
The text was updated successfully, but these errors were encountered: