How to copy/write in excel sheet using rubyXL gem. Please advice

516 Views Asked by At

I am using the below option 'add'

worksheet1.add(2, 6, "A1")

I need to copy the text A1 in (2,6). Error message is get is "undefined method `add' for # (NoMethodError)"

1

There are 1 best solutions below

0
On

Adding Cells

worksheet.add_cell(0, 0, 'A1') # Sets cell A1 to string "A1"

worksheet.add_cell(0, 1, '', 'A1') # Sets formula in the cell B1 to '=A1'

https://github.com/weshatheleopard/rubyXL