zdavatz / spreadsheet

The Ruby Spreadsheet by ywesee GmbH
http://spreadsheet.ch
GNU General Public License v3.0
1.13k stars 240 forks source link

No method to insert columns? #128

Closed ShadowVariable closed 9 years ago

ShadowVariable commented 9 years ago

Is there any way to insert a column? I have an array I want to insert as a column but I only see methods to insert rows.

zdavatz commented 9 years ago

Read the Guide: https://github.com/zdavatz/spreadsheet/blob/master/GUIDE.md

dgilperez commented 8 years ago

I did and honestly did not find an answer ... "not supported", is it?

zdavatz commented 8 years ago

I guess not really. You basically need to write a new file with all the data.

zdavatz commented 8 years ago

But see the modify part in the Guide: https://github.com/zdavatz/spreadsheet/blob/master/GUIDE.md#writing-is-easy

dgilperez commented 8 years ago

Thanks for the response. I ended up using Matrix to build a matrix with the columns, and then .transpose it to have rows. Not pretty, not useful in most cases, but it did for me. I guess other approaches with sheet.row(X).insert Y would also work.

zdavatz commented 8 years ago

Thank you for sharing your solution. Please continue to do so.