i dont have any code upto now. I have a excel sheet with err_id (col 1), type (col 2), priority (col 3).... etc. In a csv i have err_id's. I want to delete that entire row where the err_id matches from my excel sheet. I googled "How to delete entire row" it redirected to some questions in this site which uses Win32::OLE to delete the entire row. But my RHEL not supporting that. Guide me a module which can delete an entire row | [reply] |
Use whatever module you use now for writing the Excel file. Then, when copying rows from the file you read to the file you write, leave out the rows you don't want. For example, see Spreadsheet::ParseXLSX and Spreadsheet::ParseExcel. I think you should also be easily able to use splice on the internal data structures of Spreadsheet::ParseExcel::Worksheet, because it seems that a worksheet is basically represented as a multidimensional array:
...
return $self->{Cells}->[$row]->[$col];
...
finding how to apply splice to such a data structure is a good exercise in learning Perl. | [reply] [d/l] |