Skip to content
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

Excel import fails with files exported from Intellij DataGrip #425

Open
rpx99 opened this issue Oct 7, 2024 · 1 comment · Fixed by OSGeo/gdal#11000
Open

Excel import fails with files exported from Intellij DataGrip #425

rpx99 opened this issue Oct 7, 2024 · 1 comment · Fixed by OSGeo/gdal#11000

Comments

@rpx99
Copy link

rpx99 commented Oct 7, 2024

Did an export of a TEST table into a .xlsx file using the Excel extractor included in Intellij DataGrip (latest 2024.2.3 Ultimate) with its included export funtionality.

When I try to import the exported file into duckdb I get the error message presented:

[2024-10-07 15:13:57] Connected
test.main> INSTALL spatial
[2024-10-07 15:13:57] completed in 10 ms
test.main> LOAD spatial
[2024-10-07 15:13:57] completed in 219 ms
test.main> CREATE OR REPLACE TABLE TESTTBL AS SELECT * FROM st_read('c:/temp/TEST.xlsx', layer = 'Result 1')
[2024-10-07 15:13:57] IO Error: GDAL Error (1): Invalid row: 0

The file export results in a quite small .xlsx.

Storing the exported file again with EXCEL (in my case version 2016) makes the file larger as additional information seems to get included, but this version can be succesfully imported into duckdb.

test.main> INSTALL spatial
[2024-10-07 15:14:35] completed in 3 ms
test.main> LOAD spatial
[2024-10-07 15:14:35] completed in 3 ms
test.main> CREATE OR REPLACE TABLE TESTTBL AS SELECT * FROM st_read('c:/temp/TEST2.xlsx', layer = 'Result 1')
[2024-10-07 15:14:35] completed in 51 ms

Don't know if it's a bug but at least good to know...

Additionally it seems a lock on the import file seems to be kept (which does not look correct):

[2024-10-07 15:13:57] Connected
test.main> INSTALL spatial
[2024-10-07 15:13:57] completed in 10 ms
test.main> LOAD spatial
[2024-10-07 15:13:57] completed in 219 ms
test.main> CREATE OR REPLACE TABLE TESTTBL AS SELECT * FROM st_read('c:/temp/TEST.xlsx', layer = 'Result 1')
[2024-10-07 15:13:57] IO Error: GDAL Error (1): Invalid row: 0
test.main> INSTALL spatial
[2024-10-07 15:14:19] completed in 3 ms
test.main> LOAD spatial
[2024-10-07 15:14:19] completed in 3 ms
test.main> CREATE OR REPLACE TABLE TESTTBL AS SELECT * FROM st_read('c:/temp/TEST.xlsx', layer = 'Result 1')
[2024-10-07 15:14:19] IO Error: GDAL Error (1): GDALOpen() called on c:/temp/TEST.xlsx recursively

Here the files:

TEST.xlsx
TEST2.xlsx

@rouault
Copy link

rouault commented Oct 12, 2024

will be fixed in GDAL 3.10 per OSGeo/gdal#11000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants