473,394 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

save file on server

I want to save output file on server. (same folder)
I have no idea how can I assign path.
can i just use

$book->saveas("/final.xls");

Thx.

Oct 31 '06 #1
3 6498
kirke wrote:
I want to save output file on server. (same folder)
I have no idea how can I assign path.
can i just use

$book->saveas("/final.xls");
Do you have any more sample code for this? Ie. what is the $book
variable?

--
Kim André Akerĝ
- ki******@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Oct 31 '06 #2
<?php

$excel=new COM("Excel.Application") or Die ("Did not connect");

$excel->sheetsinnewworkbook=1;
$excel->Workbooks->Add();

$book=$excel->Workbooks(1);
$sheet=$book->Worksheets(1);

$sheet->Name="Debug-Test";
$book->saveas("/final.xls");
?>

code is like this.
what i want to know is, if i don't know exact path of directory where
my index page is in, how can I set up saveas path?


Kim André Akerĝ wrote:
kirke wrote:
I want to save output file on server. (same folder)
I have no idea how can I assign path.
can i just use

$book->saveas("/final.xls");

Do you have any more sample code for this? Ie. what is the $book
variable?

--
Kim André Akerĝ
- ki******@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Oct 31 '06 #3
kirke wrote:
[top posting fixed]
Kim André Akerĝ wrote:
kirke wrote:
I want to save output file on server. (same folder)
I have no idea how can I assign path.
can i just use
>
$book->saveas("/final.xls");
Do you have any more sample code for this? Ie. what is the $book
variable?

<?php

$excel=new COM("Excel.Application") or Die ("Did not connect");

$excel->sheetsinnewworkbook=1;
$excel->Workbooks->Add();

$book=$excel->Workbooks(1);
$sheet=$book->Worksheets(1);

$sheet->Name="Debug-Test";
$book->saveas("/final.xls");
?>

code is like this.
what i want to know is, if i don't know exact path of directory where
my index page is in, how can I set up saveas path?
In which case, it'll be something like this:

$book->saveas($_SERVER["DOCUMENT_ROOT"]."/final.xls");

--
Kim André Akerĝ
- ki******@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Nov 1 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: RickL | last post by:
I have an ASP application that uploads a specified file to the server. To retrieve the file, I simply assign the filepath and file to a hyperlink on the page. When you click "Save Target As" for...
5
by: kevin | last post by:
Hi, Any help with this would be really appreciated! I'm trying to download a file from a remote server. The access permissions is okay but the problem I'm facing is that the file is getting...
4
by: John | last post by:
Hi, I generate a report in a comma delimited file and give it a name like MyReport.csv . I then set a Hyperlink control to point tp the file HyperLink1.text = "Download"...
9
by: Ivan Demkovitch | last post by:
Hi! I would like to know if I can save File on Server using server-side code? For example, I like to create thumbnail images and populate specific directory. Do I need specific permissions...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
6
by: Pat Carden | last post by:
Hi, We need to allow webusers to upload a file on our website (on Server3, all servers run Server 2003, remotely hosted) and eventually save it on our SBS Server (Server2) which is not exposed...
3
by: Stefano | last post by:
I've a form windows with a lot of textbox controls. How can I do if I have to save all text proprety of this controls in an external file, to reload them in future?
4
by: Jonny | last post by:
Hello Group How do I open a Save File Dialog from an ASPX page behind a browse button? Any help would be fantastic!! I am using ASP.NET 1.1 using VB.NET as the coding language TIA
1
by: rn5a | last post by:
When users submit a Form with a SQL query, the resultset is retrieved from a MS-Access database table which is then exported to an MS-Excel worksheet. After the records get exported to MS-Excel, I...
3
by: evenlater | last post by:
I have an Access application on a terminal server. Sometimes my users need to export reports to pdf, rtf or xls files and save them to their own client device hard drives. They can do that right...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.