Closed srehne closed 4 years ago
thanks for reporting this!
Nothing happens if no-one is giving good examples. I hope this might be fixed in the future. I will be looking at writing my own functionality to edit xlsx files ... it's "just" zip files with XML - right? ;-) But I would love if this gem - over time - would be more "robust". I have more projects that would like to use XL I'm really not good enough with ruby to try and work out the problem with the sourcecode myself.
Since I don't want the Excel spreadsheet to be available "forever" ... could you please let me know when you have taken a copy? Kind Regards Søren Rehné
spreadsheet does NOT support XLSX files.
I'm very aware of this. But if it worked with my .xls document - I would stick to that format ;-)
I have tested the solution on this document:
http://somebody.dk/wp-content/uploads/2019/11/TOMv330.xls
But trying to write to a cell destroys elements of the document
This is my code:
I call it from console this way:
f = Excel::SendContract2.return_contract
The output says:I open the f file using:
`open #{f}`
And then Excel says: "Alert: File error: data may have been lost" After this alert: "Alert: Unable to read file" Then: "Alert: We found a problem with some content in xxxx Do you want us to try to recover as much as we can? .... " Saying yes opens up the document The good thing: The cell headline was changed ;-) The bad: All formatting is lost ... And even 1 of the sheets is completely missing.
Anyone who can help? Kind Regards Søren Rehné