Reputation: 189
How do I clear the sheet with PHPExcel? Something like Sheet.ClearContents in VBA. All I could find was delete rows and columns and it's not useful for me as I need to clear entire sheet before writing data to the file.
Upvotes: 2
Views: 4501
Reputation: 9
not a good way, you will erase the style . you should copy the style first!额
Upvotes: 0
Reputation: 1112
You can remove the sheets and create a new one.
$myExcelObj->disconnectWorksheets();
$myExcelObj->createSheet();
Upvotes: 9