You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if this has been answered somewhere, but I went through the docs and couldn't find anything related to saving changes I make to a spreadsheet to a new .xlsx file. I understand that only the reading part has been borrowed from openpyxl. But does koala allow me to do write changes to a new excel spreadsheet? If so, I wanted to know how
Here's the code I've tried so far:
from koala.Spreadsheet import Spreadsheet
filename = "test.xlsx"
sp = Spreadsheet(filename)
# check current values
print(sp.cell_evaluate('Sheet1!BV25'))
print(sp.cell_evaluate('Sheet1!BV65'))
#change to new value
sp.cell_set_value('Sheet1!BV25', 0.05)
#check if values have updated
print(sp.cell_evaluate('Sheet1!BV25'))
print(sp.cell_evaluate('Sheet1!BV65'))
#sp.gen_graph()
#sp.prune_graph()
#sp.dump(filename.replace(".xlsx","_modified.xlsx"))
The cell BV65 is dependent on BV25. After I change the value of BV25, I see the value of BV65 has updated, but I want to save these changes as a .xlsx file, without involving Microsoft Excel during the update process.
I tried the last 3 commented lines, but MS Excel could not open the generated file.
Thanks in advance,
Sanjay
The text was updated successfully, but these errors were encountered:
I was looking for the same thing: save to an Excel file. I don't see this as supported in the code (v 0.0.36).
The generated gzip file from a dump has nothing to do with an Excel format. It is just the cell graph.
I agree it would be super useful to be able to save the changed graph back into Excel. Without this feature, it is almost impossible to troubleshoot issues in the original Excel code (treating the Excel file as a function). It wouldn't need to be too exciting - the formatting is stripped - but it would be a valuable feature.
Hi
Apologies if this has been answered somewhere, but I went through the docs and couldn't find anything related to saving changes I make to a spreadsheet to a new
.xlsx
file. I understand that only the reading part has been borrowed fromopenpyxl
. But does koala allow me to do write changes to a new excel spreadsheet? If so, I wanted to know howHere's the code I've tried so far:
The cell
BV65
is dependent onBV25
. After I change the value ofBV25
, I see the value ofBV65
has updated, but I want to save these changes as a.xlsx
file, without involving Microsoft Excel during the update process.I tried the last 3 commented lines, but MS Excel could not open the generated file.
Thanks in advance,
Sanjay
The text was updated successfully, but these errors were encountered: