shenwei356 / csvtk

A cross-platform, efficient and practical CSV/TSV toolkit in Golang
http://bioinf.shenwei.me/csvtk
MIT License
992 stars 84 forks source link

[ERRO] open /tmp/excelize-3074771143: no such file or directory #251

Closed tchiavegatti closed 11 months ago

tchiavegatti commented 11 months ago

I got an error when I tried to convert an XLSX file to CSV:

csvtk xlsx2csv excelfile.xlsx -n Sheet1 > output.csv
[ERRO] open /tmp/excelize-969081702: no such file or directory

The number after /tmp/excelizes changes, but I always get the same error. I tried to run it on Linux (WSL2) and on Windows, but the result is the same:

# Windows - Powershell
Get-ChildItem $datadir -File -Filter '*.xlsx' | ForEach-Object {.\csvtk.exe xlsx2csv $_.FullName -n "Sheet1"}
[ERRO] open C:\Users\username\AppData\Local\Temp\excelize-877759494: The system cannot find the file specified.
shenwei356 commented 11 months ago

That's weird. Which version are you using? Try the latest version, please. I've confirmed it works as expected on Windows 10.

csvtk_linux_amd64.tar.gz csvtk_windows_amd64.exe.tar.gz

tchiavegatti commented 11 months ago
csvtk version
csvtk v0.27.2
shenwei356 commented 11 months ago

Is the .xlsx file large? It looks like the excelize packages do use tmp files, but when it uses is not clear.

Update:

https://github.com/qax-os/excelize/issues/1146

tchiavegatti commented 11 months ago

Around 30MB, 215,000 lines.

shenwei356 commented 11 months ago

It's fixed.