-
Notifications
You must be signed in to change notification settings - Fork 55
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
ERROR: Styles not found for this workbook. #233
Comments
How do you know it's this value that causes the error? And how did you get this error? When trying to read your file I get:
which I think is the same error as #170 - you have a sheet with only a chart in it. Trying to get the table data directly:
after deleting the chart-only tab, I can read the file:
but I still get the same error as above when trying to read the workbook. Changing the
So it seems to me that your file is somehow corrupted. |
I work with try
push!(P_FCS, i_sr["C"])
catch
println("rownum: ", rownum, ", t: ", i_sr["A"])
display(i_sr);
end For completness the full snippet: t_vec = Vector{Float64}(undef, 0)
ΦH2 = Vector{Float64}(undef, 0)
P_FCS = 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 # && rownum < 10
if ~isempty(i_sr["A"]) && ~isempty(i_sr["B"])
# if ~isempty(i_sr["A"]) && ~isempty(i_sr["B"]) && ~isempty(i_sr["C"]) # does not work, because the issue is in column "C"
# if ~isempty(i_sr[3])
push!(t_vec, i_sr["A"])
push!(ΦH2, i_sr["B"])
try
push!(P_FCS, i_sr["C"])
catch
println("rownum: ", rownum, ", t: ", i_sr["A"])
display(i_sr);
end
end
end
end
end |
I couldn't reproduce this. julia> fn_sel = "foo.xlsx"
"foo.xlsx"
julia> t_vec = Vector{Float64}(undef, 0)
Float64[]
julia> ΦH2 = Vector{Float64}(undef, 0)
Float64[]
julia> P_FCS = Vector{Float64}(undef, 0)
Float64[]
julia> 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 # && rownum < 10
if ~isempty(i_sr["A"]) && ~isempty(i_sr["B"])
# if ~isempty(i_sr["A"]) && ~isempty(i_sr["B"]) && ~isempty(i_sr["C"]) # does not work, because the issue is in column "C"
# if ~isempty(i_sr[3])
push!(t_vec, i_sr["A"])
push!(ΦH2, i_sr["B"])
try
push!(P_FCS, i_sr["C"])
catch
println("rownum: ", rownum, ", t: ", i_sr["A"])
display(i_sr);
end
end
end
end
end
rownum: 14, t: 1.0999999999999999
XLSX.SheetRow(13×4 XLSX.Worksheet: ["Tabelle1"](A2:D14) , 14, Dict{Int64, XLSX.Cell}(4 => XLSX.Cell(D14, "", "", "0.98773333333333424", ""), 2 => XLSX.Cell(B14, "", "", "0", ""), 3 => XLSX.Cell(C14, "", "1", "-5.0108524557159498E-9", ""), 1 => XLSX.Cell(A14, "", "", "1.0999999999999999", ""))) |
Could it be that it is related to the so called " |
In my Excel file is one cell in column "C" with the following value:
-5,01085245571595E-09
And this results in the error message:
ERROR: Styles not found for this workbook.
foo.xlsx
The text was updated successfully, but these errors were encountered: