The Ruby Spreadsheet

Modifying an existing Document

Spreadsheet has some limited support for modifying an existing Document. This is done by copying verbatim those parts of an Excel-document which Spreadsheet can’t modify (yet), recalculating relevant offsets, and writing the data that can be changed.

Here’s what should work:

* Adding, changing and deleting cells.

* You should be able to fill in Data to be evaluated by predefined Formulas


* Spreadsheet can only write BIFF8 (Excel97 and higher). The results of modifying an earlier version of Excel are undefined.

* Spreadsheet does not modify Formatting at present. That means in particular that if you set the Value of a Cell to a Date, it can only be read as a Date if its Format was set correctly prior to the change.

* Although it is theoretically possible, it is not recommended to write the resulting Document back to the same File/IO that it was read from.


1 Comment »

  1. Is it easy to add a new sheet to an already existing document? I only need to write on that new sheet

    Comment by Noam Silvy — September 7, 2016 @ 3:13 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: