beginner here; 2 problems

Topics: User Forum
Jan 28, 2009 at 1:58 PM
Edited Jan 28, 2009 at 1:59 PM
Hi there

I have to problems in using PhpExcel, but are  not really problems, are just questions about how to use it:
1) until now I've used PHPExcel on my local machine with WAMP, but now i wish to transfer my "web application" to a linux server, but i get this error: Uncaught exception 'Exception' with message 'Can't open 01simple.xls. It may be in use or protected.'
2) for me, doesn't seems to work $objWriter->save("php://output"); It stays allot to download the file. Can you show me how is the code for 01simple.xls using save("php://output") ??

what to do??

many thx:)
Jan 28, 2009 at 2:12 PM
Sounds like a permission problem? If you are running those tests, try e.g.

chmod 777 Tests

Feb 4, 2009 at 7:51 AM
I can generate the excel file if is not already created on the disk previously. All I wana do is to rewrite to that file.
Feb 4, 2009 at 1:53 PM
Where did the Excel file come from, already on disk? Can you give it 777 permission?

Feb 21, 2009 at 4:43 PM
Edited Feb 21, 2009 at 6:42 PM
hi there

- same thing is happening in linux if I copy a excel file generated by other user(me as a different linux user but using the same PHPExcel code ) and i try to write over it using PHPExcel
- I've tryed chmod($excelFileName, 0777 ); but I get the following message error:
Warning: chmod() [function.chmod]: Operation not permitted in .... From command line I can set chmod. I suppose this is from php.ini, but i don't have access to it.
Feb 21, 2009 at 4:56 PM
There is often such mess with permissions on Linux. You should be able to log in as root on that Linux machine and set permission 777 for that file via the command line.

Feb 21, 2009 at 6:46 PM
many thx for the prompt message replay.
Do you have any idea about how to catch that error message and replace it somehow with something more user friendly?
Feb 24, 2009 at 8:47 AM
But if you get that error message, then it's because the script is not working as it should. It will not help to suppress the error message. You need to fix the error instead.