# No node name error with XLSX

**URL:** https://discourse.julialang.org/t/no-node-name-error-with-xlsx/90849
**Category:** General Usage
**Tags:** question, package, error, xlsx
**Created:** [November 26, 2022, 1:30pm UTC](https://discourse.julialang.org/t/no-node-name-error-with-xlsx/90849 "2022-11-26T13:30:12Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Pino](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Pino](https://discourse.julialang.org/u/Pino)
#### Post date: [November 26, 2022, 1:30pm UTC](https://discourse.julialang.org/t/no-node-name-error-with-xlsx/90849/1 "2022-11-26T13:30:12Z")

</div>

Hi,

I’m trying to write some code to import spreadsheets into julia, stack them together in an array, manipulate them a bit and save them into a csv.

I’m however having problems in importing programmatically the excel files as I get a ‘no node name’ error.

```julia
Location = pwd() 
Directory = readdir(Location)

for ii in eachindex(Directory)
    excel = XLSX.readxlsx(Directory[ii])
end 

```

But I found that the following sort of works:

```julia
myexl=XLSX.openxlsx(Directory[1], enable_cache=false)

```

but then I don’t know how to make myexl into an array. So my question is why the no node error usinf readxlsx and other derivative xlsx functions?

What I can do better to achieve my task?

---

<div class="post-metadata">

### Author: ![hhaensel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hhaensel/32/1207_2.png) [@hhaensel](https://discourse.julialang.org/u/hhaensel)
#### Post date: [February 7, 2023, 11:30pm UTC](https://discourse.julialang.org/t/no-node-name-error-with-xlsx/90849/2 "2023-02-07T23:30:00Z")

</div>

not sure where the error comes from but you can get the data by calling

```julia
myex.workbook.sheets[1][:]

```

---

<div class="post-metadata">

### Author: ![Jake](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jake/32/46007_2.png) [@Jake](https://discourse.julialang.org/u/Jake)
#### Post date: [February 8, 2023, 1:21am UTC](https://discourse.julialang.org/t/no-node-name-error-with-xlsx/90849/3 "2023-02-08T01:21:08Z")

</div>

Or if you want to use a DataFrame then

```julia
myexcel = DataFrame(XLSX.readtable(filename, sheet, Column))

```

---

<div class="post-metadata">

### Author: ![ellocco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ellocco/32/31331_2.png) [@ellocco](https://discourse.julialang.org/u/ellocco)
#### Post date: [June 23, 2023, 1:53pm UTC](https://discourse.julialang.org/t/no-node-name-error-with-xlsx/90849/4 "2023-06-23T13:53:28Z")

</div>

I gave up with the function `XLSX.readxlsx()` ☹

Here is my code snipped, for an excel file, where the first line with data starts at line number 4 and I know that in column one is the time and in column 2 the H2-flow:

```julia
fn_sel = "yourfilename.xlsx"
t_vec = Vector{Float64}(undef, 0)
ΦH2 = Vector{Float64}(undef, 0)
XLSX.openxlsx(fn_sel, enable_cache = false) do xf
    name_sheet1 = XLSX.sheetnames(xf)[1]
    sheet = xf[name_sheet1]
    for i_sr in XLSX.eachrow(sheet) # sr = sheet raw
        rownum = XLSX.row_number(i_sr)
        if rownum > 3 
            # println("t: ", i_sr["A"], " s")
            if ~isempty(i_sr["A"]) && ~isempty(i_sr["B"])
                push!(t_vec, i_sr["A"])
                push!(ΦH2, i_sr["B"])
            end
        end
    end
end

```

---

<div class="post-metadata">

### Author: ![Pino](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Pino](https://discourse.julialang.org/u/Pino)
#### Post date: [July 2, 2023, 4:43pm UTC](https://discourse.julialang.org/t/no-node-name-error-with-xlsx/90849/5 "2023-07-02T16:43:13Z")

</div>

> [@ellocco](#):
>
> ```julia
> t_vec = Vector{Float64}(undef, 0)
> ΦH2 = Vector{Float64}(undef, 0)
> 
> ```

thanks, trying this solution now. A bit strange that I haven’t found a reliable way to programmaticaly import and read a bunch of excel files for analysis in Julia.

---

<div class="post-metadata">

### Author: ![ellocco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ellocco/32/31331_2.png) [@ellocco](https://discourse.julialang.org/u/ellocco)
#### Post date: [July 2, 2023, 6:26pm UTC](https://discourse.julialang.org/t/no-node-name-error-with-xlsx/90849/6 "2023-07-02T18:26:11Z")

</div>

> [@ellocco](#):
>
> I gave up with the function XLSX.readxlsx()

Meanwhile it is clear, why `readxlsx()` is not suitable for my `XLSX`-file:  
[# ERROR: Styles not found for this workbook. #233](https://github.com/felipenoris/XLSX.jl/issues/233)

---

<div class="post-metadata">

### Author: ![hhaensel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hhaensel/32/1207_2.png) [@hhaensel](https://discourse.julialang.org/u/hhaensel)
#### Post date: [September 5, 2024, 6:52am UTC](https://discourse.julialang.org/t/no-node-name-error-with-xlsx/90849/7 "2024-09-05T06:52:14Z")

</div>

Just submitted a related PR for XLSX.jl  
You may be interested in trying that out and feedback here.

> <https://github.com/felipenoris/XLSX.jl/issues/170>
>
> \`\`\`
> using XLSX: readtable, readxlsx
> 
> file\_path = "folder1\\\\folder2\\\\girder\_re…sults\_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\](https://github.com/felipenoris/XLSX.jl/files/6477584/girder\_results\_10.xlsx)

---

<div class="post-metadata">

### Author: ![hhaensel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hhaensel/32/1207_2.png) [@hhaensel](https://discourse.julialang.org/u/hhaensel)
#### Post date: [September 12, 2024, 8:58am UTC](https://discourse.julialang.org/t/no-node-name-error-with-xlsx/90849/8 "2024-09-12T08:58:21Z")

</div>

Meanwhile the PR is accepted and version XLSX v0.10.3 with the fix included is released.

---

<div class="post-metadata">

### Author: ![ellocco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ellocco/32/31331_2.png) [@ellocco](https://discourse.julialang.org/u/ellocco)
#### Post date: [September 12, 2024, 9:30am UTC](https://discourse.julialang.org/t/no-node-name-error-with-xlsx/90849/9 "2024-09-12T09:30:48Z")

</div>

Great work!!! - Thanks a lot! 🙂
