in reply to Help adding a worksheet in a subroutine with Spreadsheet::WriteExcel

That looks like a classic case of overwriting the newly written worksheet each time thru the loop.
  • Comment on Re: Help adding a worksheet in a subroutine with Spreadsheet::WriteExcel

Replies are listed 'Best First'.
Re^2: Help adding a worksheet in a subroutine with Spreadsheet::WriteExcel
by Anonymous Monk on Jan 05, 2007 at 18:30 UTC
    I think I used a bad example...I posted this question too soon. The reason it isn't getting added in the sub is because I never close the workbook (e.g. $workbook->close();)

    Do that and it works fine

      Thanks so much, You solved my problem..even I was missing close function and struggling to add worksheets.