ipysheet
ipysheet copied to clipboard
Editing empty sheet
As pointed out in #93 and #112, creating an empty sheet, editing it and using to_dataframe or to_array to export the result does not work. Because those functions are Cell based, and no Cells were created, they cannot work currently. It seems to me that a decent fix would be to create a Cell widget from the client-side whenever the user enters a new value in a cell (if there is no cell already created at this position obviously).

Hi, just wondering if there is any update on that? I'm trying to load data into a sheet with .from_dataframe(), but after manually modifying it, .to_dataframe() returns an empty dataframe. Thanks!
Following..
https://github.com/QuantStack/ipysheet/issues/112 It would seem that all cells need to be specified in the python code with cell(x,y, value) first, then it'll sync it back and to_dataframe will work.
So as suggested, creating the empty cells from the client side, or, in the from_dataframe or any construction methods used to make the sheet.
Indeed. You need to create the cell/cell range Python side first. Otherwise Python is not aware of the changes.
And I understand why creating them automatically isn't a good idea. It's very slow to sync if they are all individual cells. So you'll have to optimize with ranges as much as possible. It takes as much time to sync an entire range as it takes for a single cell.