Using Aspose Cells for C3.net, our requirement is to remove rows from table which has 0 value for year value columns[“YE 31 March 2021” and “YE 31 March 2022”]. For example in this table we would want to remove programmatically the last but one row which has 0 value for both columns[“Director’s commission”]. This need to be done for the entire Excel workbook with multiple worksheets.
"Other_expenses" “YE 31 March 2021” "YE 31 March 2020"
Legal and professional fees 157,021.63 157,022.13
Corporate social responsibility (refer note 0) 10,620.65 10,620.65
Travelling and conveyance 74,549.26 74,549.26
Rent 2,996.50 2,996.50
Security Service charges 0 10.00
Director’s commission 0 0 <–This row need to removed
Printing and stationery 1,241.70 1,241.70
Checked the knowledge artcile-> Delete Blank Rows and Columns in a Worksheet|Documentation (aspose.com)
In your solution instead of looping through all rows/cells in a worksheet or workbook
could this below questions possible?
- If the 0 value rows[all columns have 0 value] are marked with a metadata (Example a token like “<<zero_val>>”) would it be possible to call a function to delete all the rows which has this metadata? This way this will be a one call and would not need to loop through all the rows and cells.