Documentation missing?

Topics: Developer Forum
May 16, 2012 at 6:44 PM

Where in the documentation file does it explain how to copy a worksheet, create a new worksheet, or remove a worksheet? We have PHPExcel v.1.7.1. Thanks!

May 16, 2012 at 8:02 PM

It doesn't in the documentation file, but a number of the examples in /Tests do these things, and the API documentation should also tell you what methods are available for creating/deleting worksheets within a workbook.

  • createSheet() or addSheet() are good options for creating a new worksheet (addSheet() if you've instantiated a new PHPExcel_Worksheet object using new)
  • clone an existing worksheet from a workbook, then use addSheet() to embed the copy in a workbook can be used to copy.
  • addExternalSheet() can be used to copy a sheet from one workbook to another.
  • removeSheetByIndex() is good for deleting.


May 16, 2012 at 8:25 PM

It seems that these things should be in the documentation file since they're pretty basic functions and I imagine would need to be used a lot, but at least there's a way to find them. Thank you!