I'm having difficulty creating new sheets. When I create a new sheet and try to change the name I get the following error:
Fatal error: Call to a member function setTitle() on a non-object
My code is as follows:
I have found a way to get past the error like this:
However, using that method results in Excel telling me the file is damaged.
I'm not sure what I'm doing wrong.