Writing to an Excel Spreadsheet

F

FSD

I am using the Spreadsheet-WriteExcel-211 module to write values into a
spreadsheet. The module is very powerful and robust, but there is one thing
that I cannot seem to do. I need to open a spreadsheet daily and write
values to it. Not a problem, but I do not know how to append to a sheet.
That is, I do not know how to find the last row in the sheet and then simply
write to $lastrow+1. Does anyone have an idea how I can do this?
Thanks
FSD
 
S

Steven Kuo

I am using the Spreadsheet-WriteExcel-211 module to write values into a
spreadsheet. The module is very powerful and robust, but there is one thing
that I cannot seem to do. I need to open a spreadsheet daily and write
values to it. Not a problem, but I do not know how to append to a sheet.
That is, I do not know how to find the last row in the sheet and then simply
write to $lastrow+1. Does anyone have an idea how I can do this?
Thanks
FSD



Spreadsheet::parseExcel defines a "Worksheet" object that
appears to be a blessed hash reference and allows one
to find the last row by dereferencing. E.g.,

$oWkS->{MaxRow}

See the documentation for Spreadsheet::parseExcel for details.
Use it to parse the spreadsheet, then use Spreadsheet::WriteExcel
to update the spreadsheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top