Closed nick133 closed 2 years ago
Could you provide the excel sample for you case? Here's our result with simplified excel and code sample.
You can also check the version installed with
import excelin
doAssert excelinVersion == "0.4.7"
to make sure whether it's the latest version. If it runs with no error then it's the latest.
Upgraded to 0.4.7 with no luck. Try this code on attached file:
import
std/strutils,
std/strformat,
excelin
proc main =
let
fn = "Finances.xlsx"
xl = readExcel fn
sheet = xl.getSheet "Portfolio"
echo "---: " & sheet.row(2)["E", string]
echo "Aaa: " & sheet.row(2)["F", string]
echo "Bbb: " & sheet.row(2)["G", string]
echo "Ccc: " & sheet.row(2)["H", string]
when isMainModule:
main()
It produces:
---: Bbb
Aaa: Ccc
Bbb: Ddd
Ccc:
If I delete some formatting or whole cells from the A-D columns - at some point it behaves as expected. Otherwise, data is always shifted by column(s) or sometimes is shifted and mixed
Feel free to re-open if the problem persists.
I have SEGFAULT with v0.4.8 after every call to .row()[] at runtime like this:
Traceback (most recent call last)
/home/nick/Projects/Code/xlstest/src/xlstest.nim(53) xlstest
/home/nick/Projects/Code/xlstest/src/xlstest.nim(41) main
/home/nick/.nimble/pkgs/excelin-0.4.8/excelin/internal_rows.nim(7) row
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
even on empty xlsx file
The issue continuation is now tracked at #4 .
Hi, it looks like new issue is coming. I try to parse excel column in a loop but I get a results from other columns
To reproduce I created minimal xlsx file with no formatting at all and run this code:
it prints:
-ddd-aaa-bbb
and that's the file's content: