a more generic xl_inc_row (and related)?

3 views
Skip to first unread message

Terrence Brannon

unread,
Oct 6, 2011, 5:33:49 PM10/6/11
to spreadsheet...@googlegroups.com
I had a need to write the same class of data at 3 places in a spreadsheet. However, there was no function to take a certain cell and provide an arbitrary row-increment, only 1.

Before submitting a patch, I wanted to discuss my need for this and see what others thought.

Here is the function I am using for my purposes:


sub my_xl_inc_row {
  my($cell, $inc)=@_;
  $inc //= 1;

  my ($row, $col, $row_abs, $col_abs) = xl_cell_to_rowcol($cell);

  return xl_rowcol_to_cell($inc + $row, $col, $row_abs, $col_abs);
}

Reply all
Reply to author
Forward
0 new messages