I'm looping through an Excel spreadsheeet, acquiring cells, and adding
the data to a ruport table. I want access to the record just
appended, but unsure of how to get to it. Code follows:
begin
@tbl_PAS << { # append row into table
:clientid =>
get_cell_as_text(row,@buildlist[:clientid]),
:wdatetime =>
get_cell_as_date(row,@buildlist[:wdatetime]),
:emp => emp_merge(row),
:whours => get_cell_as_num(row,@buildlist[:whours]),
...
}
rescue
puts "Unexpected error inserting data into table."
puts options.inspect
raise
end
# tag record for summary counts
case
when r.proj[0,4] == 'ADMN'
r.tag(:Administration)
when r.task[0,5] == 'AL916'
t.tag(:Support)
...
I want r. to the last record appended. I was hoping r = @tbl_PAS <<
would be it. But r points to the table, not the last record appended.
Any advice?
dvn