Git Product home page Git Product logo

excelin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

excelin's Issues

Embedded image is missing after saving

#1 it seems this works as expected now, but other thing is showing up, here's how it looks like after and before saving:

20220505_00h37m58s_grim

btw, all this happens under linux/libreoffice calc

Saving xlsx file discards existing charts

Hi,

let xl = readExcel("calc.xlsx")
let sheet = xl.getSheet("Calc")
sheet.row(1)["A"] = "hello"
xl.writeFile("calc-out.xlsx")

There was pie chart in different sheet in calc.xlsx and after running this code that chart was gone in calc-out.xlsx. I wonder is it a bug or saving a charts/diagrams is unsupported yet?

SegFault with 0.4.8 after every call to .row()[]

Sorry, I can't reopen issue that I haven't closed.
Here is what's happening at runtime:

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?)

Wrong column addressing when reading cells

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:

echo "-" & sheet.row(2)["E", string] &
    "-" & sheet.row(2)["F", string] &
    "-" & sheet.row(2)["G", string]

it prints: -ddd-aaa-bbb

and that's the file's content:
20220514_20h12m53s_grim

Is there any 'get last-row' proc ?

Now, I use following script

import excelin

proc getLastRow(sheet: Sheet, col: string):int =
 var rowNum:int = 1
  
 type tmp = object
 while sizeof(tmp) == 1:
   let value = sheet.row(rowNum).getCell[:string](col)
   if value == "":
     break
   inc(rowNum)
 result = rowNum - 1

if isMainModule:
  let excel = readExcel("src.xlsx")
  let sheet = excel.getSheet(excel.sheetNames()[0])

  let lastRow = sheet.getLastRow("A")
  echo lastRow

but, If there is a blank cell between cells with values, this proc will not work.

SegFault on readExcel()

I'm not sure it's an issue, anyways since v0.5.3 I get strange segfault (nim1.6.2):

Traceback (most recent call last)
/home/nick/xlstest/src/xlstest.nim(8) xlstest
/home/nick/.nimble/pkgs/excelin-0.5.3/excelin.nim(138) readExcel
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
zsh: segmentation fault (core dumped)  ./xlstest

and with nim 1.9.5 i've got:

Traceback (most recent call last)
/home/nick/xlstest/src/xlstest.nim(8) xlstest
/home/nick/.nimble/pkgs2/excelin-0.5.3-ec9c2b93c098d062d83c3706198e5f9047d68460/excelin/internal_utilities.nim(71) readExcel
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
zsh: segmentation fault (core dumped)  ./xlstest

the code is simply:

import excelin
let xl = readExcel("Test.xlsx")

xlsx file is empty, created with libreoffice,
may be I'm doing something wrong, but cant guess what exactly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.