Yes, this is a known issue. Search the list please. If you modify an
XLS with several sheets but only modify one of the sheets (and don't
touch the other data), there is ow way, that spreadsheet "remembers"
what is in the other sheets. You will have to write the unmodified
sheets as well or otherwise unexpected things will happen.
Ergo: Write the modified sheet and also write the complete unmodified
sheets again, when modifying an XLS with spreadsheet with several
sheets.
If you have a patch for this issue, let me know.
Best
Zeno
On Fri, Sep 30, 2011 at 2:09 PM, talazac cedric <tal...@gmail.com> wrote:
> I realy need to modify an excel file containing 3 sheet and I just edit 2 sheet.
In this case write the other sheets out as well. Spreadsheet only does
what you tell it to do.
If we have time we may finish a patch for Christmas.
Best
Zeno
Yes, this sounds plausible. Have you tried that?
Think of spreadsheet, as in that it does what you tell it to do. If
you only tell spreadsheet to write one Sheet but the File contains
tree, then some strange things will happen. You have to rewrite every
sheet, no matter if you changed something in the sheet or not. If the
sheet is there, write it. Or you have to delete the sheets if they are
empty.
Spreadsheet does not guess what you want to do with the sheets that
you opened but did not edit.
Best
Zeno
What works, works! Thanks for sharing. If we find something better, I
will let you know.
Best
Zeno
Thank John and if you have some time write a short writeup in a gist
with your sample file and the code of John.
Best
Zeno
On Wed, Oct 26, 2011 at 10:31 PM, Philippe Rathe <pra...@gmail.com> wrote:
> Rewriting the worksheets was not working for me. I had to use:
>
> book.worksheet(1).each(0) { |row| row.replace row }
> book.worksheet(2).each(0) { |row| row.replace row }
> each(0) is if you would want to prevent skipping "empty" rows
Ok, thanks for the Feedback.
Best
Zeno
What issue? Please link it here.
Have you tried always writing both sheets?
--
You received this message because you are subscribed to the Google Groups "spreadsheet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyspreadshe...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.