Is it possible to delete rows in excel sheet using PHP ?
2 Answers
Only works if your PHP is hosted under Windows.
This should be a good start if PHPExcel* doesn't work.
Open
$this->excel = new COM("Excel.sheet") or $this->error("error");
$this->workbook = $this->excel->application->Workbooks->Open($path) or $this->error("error");
Close
$this->excel->application->ActiveWorkbook->Close("False");
unset($this->workbook);
unset($this->excel);
*I've never used PHPExcel, but it doesn't look bad
1 Comment
Tony Miller
Excellent solution, but it's important to note that this code requires a Windows hosted PHP; it won't work on Linux/UNIX (Mac?).