in reply to Re^4: Delete entire row without using Win32::OLE
in thread Delete entire row without using Win32::OLE

Please have a look at the documentation of Spreadsheet::ParseExcel::SaveParser. It does not "edit" your file, it loads and then overwrites your excel file. You will have to find out how to alter the data structure and then do that. I've already shown you approaches to that, but you seem to want to avoid these.

  • Comment on Re^5: Delete entire row without using Win32::OLE

Replies are listed 'Best First'.
Re^6: Delete entire row without using Win32::OLE
by ravi45722 (Pilgrim) on Sep 02, 2015 at 13:15 UTC
    Corion I read that and done program with that. But its not "overwriting" my xlsx file.
    # Open an existing file with SaveParser my $parser = Spreadsheet::ParseExcel::SaveParser->new(); my $template = $parser->Parse('B_MUM_dashboard_month_latency_corrected +_FDB.XLS'); # Get the first worksheet. my $sheet = $template->worksheet(0); my $row = $max_rows; my $col = 1; while (my @row = $sth->fetchrow_array()) { foreach my $value (@row) { $sheet->AddCell( $row, $col, $value ); ++$col; } } $template->SaveAs('B_MUM_dashboard_month_latency_corrected_FDB.XLS');

    Its working very well for .xls files. But I want to "overwrite" .XLSX files