2

Is it possible to delete rows in excel sheet using PHP ?

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

Excellent solution, but it's important to note that this code requires a Windows hosted PHP; it won't work on Linux/UNIX (Mac?).
2

If it's Excel 2007 you can take a look at http://www.phpexcel.net

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.