ringabout / xlsx

Parse excel written in Nim.
MIT License
61 stars 12 forks source link

LibreOffice calc files cant get parsed #2

Closed ThomasTJdev closed 4 years ago

ThomasTJdev commented 4 years ago

Hi @xflywind

When I save the XLSX files with LibreOffice calc, the library cant parse the file. I have testet it by cloning the repo and opening and saving the test.xlsx file without modifications - this gives the error below. The lib is just hanging, and I need to ctrl+c to quit.

The XLSX file which does not work is attached here (md5: e23b4db13be9a1615f3d11093d5189da): test.xlsx

[user: ~/tmp/xlsx2] - [master] $ nimble test
  Executing task test in /home/user/tmp/xlsx2/xlsx.nimble
Hint: used config file '/home/user/.choosenim/toolchains/nim-1.0.4/config/nim.cfg' [Conf]
Hint: used config file '/etc/nim/config.nims' [Conf]
Hint: used config file '/home/user/tmp/xlsx2/tests/config.nims' [Conf]
Hint: operation successful (15155 lines compiled; 0.023 sec total; 15.266MiB peakmem; Debug Build) [SuccessX]
Hint: /home/user/tmp/xlsx2/tests/alltests  [Exec]

[Suite] Test parse Excel
^CSIGINT: Interrupted by Ctrl-C.
SIGINT: Interrupted by Ctrl-C.
SIGINT: Interrupted by Ctrl-C.
stack trace: (most recent call last)
/tmp/nimblecache/nimscriptapi.nim(165, 16)
/home/user/tmp/xlsx2/xlsx_29517.nims(23, 8) testTask
/home/user/.choosenim/toolchains/nim-1.0.4/lib/system/nimscript.nim(252, 7) exec
/home/user/.choosenim/toolchains/nim-1.0.4/lib/system/nimscript.nim(252, 7) Error: unhandled exception: FAILED: nim c -r tests/alltests.nim [OSError]
Traceback (most recent call last)
/home/user/tmp/xlsx2/tests/test_parse_excel.nim(10) test_parse_excel
/home/user/tmp/xlsx2/src/xlsx/utils.nim(897) parseExcel
/home/user/tmp/xlsx2/src/xlsx/utils.nim(206) parseSharedString
/home/user/tmp/xlsx2/src/xlsx/utils.nim(155) parseStringTable
/home/user/.choosenim/toolchains/nim-1.0.4/lib/pure/parsexml.nim(755) next
/home/user/.choosenim/toolchains/nim-1.0.4/lib/pure/parsexml.nim(741) getTok
/home/user/.choosenim/toolchains/nim-1.0.4/lib/pure/parsexml.nim(706) rawGetTok
/home/user/.choosenim/toolchains/nim-1.0.4/lib/system/gc.nim(249) unsureAsgnRef
/home/user/.choosenim/toolchains/nim-1.0.4/lib/system/gc_common.nim(305) isOnStack
SIGINT: Interrupted by Ctrl-C.
     Error: Exception raised during nimble script execution
Error: execution of an external program failed: '/home/user/tmp/xlsx2/tests/alltests '
ringabout commented 4 years ago

Thanks.I Have fixed it, but still a lot of issues to do.

ringabout commented 4 years ago

These days I am really busy.When I have more free time, I will add more tests.