PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
[Solved] Saving with Excel Writer
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats
View previous topic :: View next topic  
Author Message
daemonkin



Joined: 05 Feb 2008
Posts: 10

PostPosted: Tue Feb 05, 2008 5:23 pm    Post subject: Reply with quote

Code:
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'PEAR.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
require_once 'Spreadsheet/Excel/Writer.php';
$workbook = new Spreadsheet_Excel_Writer('/home/devkba/public_html/files/test.xls');
$worksheet =& $workbook->addWorksheet('My first worksheet');
$workbook->setTempDir('/home/devkba/public_html/files/temp');
$worksheet->write(0, 0, "did this work?");
$workbook->close();
?>


Directory files is in public_html and is 777 permissions.
Is this correct?
_________________
Regards,
D.
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 998

PostPosted: Tue Feb 05, 2008 5:27 pm    Post subject: Reply with quote

daemonkin wrote:
Directory files is in public_html and is 777 permissions.
Is this correct?


Should work, yes. Did you have deleted test.xls before running the script?
Back to top
View user's profile Send private message
daemonkin



Joined: 05 Feb 2008
Posts: 10

PostPosted: Tue Feb 05, 2008 5:49 pm    Post subject: Reply with quote

ZOMG!

I put a file in there just in case it was looking for it.
I just removed it and it has now worked.

Thank you for your time and effort in this.

I will continue to use and abuse this package and I hope you are as helpful with my inevitable questions in the future!

D.
_________________
Regards,
D.
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 998

PostPosted: Tue Feb 05, 2008 6:23 pm    Post subject: Reply with quote

daemonkin wrote:
I put a file in there just in case it was looking for it.
I just removed it and it has now worked.


Okay, perfect. Just as an explanation: The FTP user is different from the webserver user, and therefore, the latter may not overwrite files from the other.

daemonkin wrote:
I will continue to use and abuse this package and I hope you are as helpful with my inevitable questions in the future!


I'll try. Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats All times are GMT + 2 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software