View Single Post
Old 08-22-2008, 04:52 AM   #1 (permalink)
superthin
The Wanderer
 
superthin's Avatar
 
Join Date: Aug 2008
Posts: 16
Thanks: 7
superthin is on a distinguished road
Default Where is my file?

Hi every body,

I am creating a small project to manage some books for my team. Exporting database to an Excel (*.xls) file is very important because an the team's member will use that file to import into an barcode printing application.

I found Class: MS-Excel Stream Handler (excel, xls, spreadsheet, read excel) - PHP Classes . This class is useful. I could get an Excel file like I expected (through download, cannot find file on server).

The problem was I cannot understand:

Code:
// line 9 to 15 in example_export.php from the class above

require_once "excel.php";
$export_file = "xlsfile://tmp/example.xls";
$fp = fopen($export_file, "wb");
if (!is_resource($fp))
{
    die("Cannot open $export_file");
}
$export_file = "xlsfile://tmp/example.xls";

What is xlsfile:// ? The class's author said that. It is protocol to generate Excel file.

I cannot find example.xls in any folder on my PC. If I change xlsfile://tmp/example.xls into absolute path like xlsfile://C:/temp/example.xls or any another, an error:

Quote:
Warning: fopen(xlsfile://c:/temp/example.xls) [function.fopen]: failed to open stream: "xlsStream::stream_open" call failed in...
(view source is $fp = fopen($export_file, "wb"); )
How to fix to get generated file?

I use Windows XP Service Pack 2. The web server is localhost use AppServ 2.5.10. The web server was installed in C:\AppServ as default.

Please tell me can I get my file. Which file was generated and store on server (NOT from download).


Thank you.
__________________
http://khoancatbetong.com - Vietnamese Concrete Technician Forum
superthin is offline  
Reply With Quote