felipenoris / XLSX.jl

Excel file reader and writer for the Julia language.
https://felipenoris.github.io/XLSX.jl/stable
Other
273 stars 57 forks source link

ERROR: ArgumentError: no node name #170

Closed rozsasarpi closed 3 weeks ago

rozsasarpi commented 3 years ago
using XLSX: readtable, readxlsx

file_path = "folder1\\folder2\\girder_results_10.xlsx"

xt = readtable(file_path, "XLSX-Export")
xf = readxlsx(file_path)

readtable and readxlsx both return an error: ERROR: ArgumentError: no node name

Here is the error trace for readxlsx:

Stacktrace:
 [1] nodename(::EzXML.StreamReader) at C:\Users\arpada\.julia\packages\EzXML\ZNwhK\src\streamreader.jl:255  
 [2] iterate(::XLSX.SheetRowStreamIterator, ::Nothing) at C:\Users\arpada\.julia\packages\XLSX\cRAtd\src\stream.jl:91
 [3] iterate(::XLSX.WorksheetCache{XLSX.SheetRowStreamIterator}, ::Int64) at C:\Users\arpada\.julia\packages\XLSX\cRAtd\src\stream.jl:238
 [4] iterate(::XLSX.WorksheetCache{XLSX.SheetRowStreamIterator}) at C:\Users\arpada\.julia\packages\XLSX\cRAtd\src\stream.jl:216
 [5] open_or_read_xlsx(::String, ::Bool, ::Bool, ::Bool) at C:\Users\arpada\.julia\packages\XLSX\cRAtd\src\read.jl:229
 [6] readxlsx(::String) at C:\Users\arpada\.julia\packages\XLSX\cRAtd\src\read.jl:37
 [7] top-level scope at REPL[24]:1

XLSX.jl 0.7.6 Julia 1.5.3 Windows 10

girder_results_10.xlsx

cwiese commented 3 years ago

I am getting this also on a particular workbook. We try tp debug.

cwiese commented 3 years ago

Okay .. readtable will read all sheets and if there is a sheet with NO ROWS (like a chart pointing to another sheet) ..it will error.

I got around this by :

julia> xf = XLSX.openxlsx(joinpath(filedir, fn), enable_cache=false)
XLSXFile("xxxxxxxxx.xlsx") containing 2 Worksheets
            sheetname size          range        
-------------------------------------------------
               Sheet1 12646x91      A1:CM12646   
               Chart size                  unknown

then I only read the sheet I need xf[1] ..  
hhaensel commented 1 month ago

Just submitted a PR #267 which happens to fix this issue. I first thought, this issue would be unrelated, and digged deeper to solve my own problem. But then I saw that a file was shared in this issue and thought, I should at least test...

felipenoris commented 3 weeks ago

Closed by #267 .