Open facuhump2409 opened 3 years ago
how was the Excel file created? Which software created the original XLS file that you are trying to edit?
It was created in Microsoft excel and then I had to change the extension from .xlsx to .xls in free office
So the original file was XLSX? XLSX is XML, where XLS is a binary format. We only support XLS. You should also try the LibreOffice commandline tools.
Yes, that’s why I changed its format to .xls but still I don’t see any changes in the file when trying to update a row. Is there something I’m doing wrong?
Yes, but I’m not trying to add a row but to update a row
are you using the file that you saved with LibreOffice to update
the row via Ruby Spreadsheet Gem?
Yes
ok, the make a simple test script to see if that works.
Hi, I've been having trouble trying to modify an excel file. What I want to do is after processing the data from the excel, change the value from the row. Here's my code:
book = Spreadsheet.open "26-12 orders.xls"
messages = book.worksheet "Whatsapp Messages"
messages.each do |message|
#All the logic
message[0] = "Already processed row"
But when I open again the excel file, no modifications have been made (the "Already processed row" isn't in the file). How can a modify a row from an existing file and save it in the original excel? Is there a way to do it?