Export to excel on windows fails.
- Dominant language
- C++
- Stars
- 91
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
### What happens
When I try to export to excel using the spatial extension in typescript using `duckdb-node` package I get the following error:
```bash
[Error: IO Error: Cannot open file "C:\Users\lucie\tmp_output.xlsx": The system cannot find the file specified.
] {
errno: -1,
code: 'DUCKDB_NODEJS_ERROR',
errorType: 'IO'
}
undefined
```
I've tried the duckdb CLI and I have written a python client to do the exact same thing and they work as intended.
### To Reproduce
Install nodejs v20.9.0
Open command prompt:
```cmd
npm i -g ts-node
npm i -g duckdb
```
code:
```ts
import * as duckdb from "duckdb";
async function exportExcel () {
const db = new duckdb.Database(":memory:");
db.all(`
INSTALL spatial; LOAD spatial;
COPY (SELECT 1 as a, 2 as b) TO 'C:\\Users\\lucie\\output.xlsx' WITH (FORMAT GDAL, DRIVER 'xlsx');
`, function(err, res) {
if (err) {
console.warn(err);
}
console.log(res);
}
);
}
exportExcel().catch((e) => {
console.log(e);
});
```
### OS:
Microsoft Windows 11 Pro
### DuckDB version:
1.1.3
### DuckDB Client:
duckdb-node
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.