weshatheleopard / rubyXL

Ruby lib for reading/writing/modifying .xlsx and .xlsm files
MIT License
1.28k stars 255 forks source link

get cell literals via index #300

Closed masterkain closed 6 years ago

masterkain commented 6 years ago

hello, sorry, not really a bug but I'm having trouble writing formulas in cells because columns are dynamic and I don't have a mapping for column named AZ.

worksheet.add_cell(idx, 8, '', "I#{idx}+H#{idx+1}+F#{idx+1}").set_number_format('0.0000000000')

my goal is to remove letters and just use indexes, thanks.

masterkain commented 6 years ago

I think I was able to solve with INDIRECT(ADDRESS(ROW()-1,COLUMN())) since I need the upper row for calculation, I'm closing this down, thanks.