Skip to content
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

How do you index cells in a sheet #242

Open
awr-paul opened this issue Jan 30, 2023 · 0 comments
Open

How do you index cells in a sheet #242

awr-paul opened this issue Jan 30, 2023 · 0 comments

Comments

@awr-paul
Copy link

Unless I create every cell individually which is just too painful, I get the error.

IndexError: no cell was previously created for (row, index) = (%s, %s)

This is preventing me creating a sheet with row(), column() or cell_range(), have I missed something? For example:

from ipysheet import sheet, row, calculation

s = sheet(rows=1, columns=4)
row(0, [2, 3, 4])

@calculation(inputs=[s[0, 0], s[0, 1], s[0, 2]], output=s[0, 3])
def foo(a, b, c):
    return (a + b) / c
s

What is the correct why to index the cells within a sheet?

It would also be handy to set the value of a cell using a callable such as a lambda instead of have to define a function with the calculation decorator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant