PJ
|
| Posted: 01/02/2003, 9:35 AM |
|
I have seen somewhere a strip of code to insert into a page that will
convert php data to display an excel spreadsheet in the browser but lost
track of it.
Can any help me?
Many thanks
|
|
|
 |
RonB
|
| Posted: 01/02/2003, 3:34 PM |
|
Put this at the top of the php page ( or even better in an event):
Header("Content-type: application/vnd.ms-excel");
Now if you link to that page it will be opened in excel.
That's all
RonB
"PJ" <apis@globalnet.co.uk> schreef in bericht
news:av1t9j$mkd$1@news.codecharge.com...
> I have seen somewhere a strip of code to insert into a page that will
> convert php data to display an excel spreadsheet in the browser but lost
> track of it.
>
> Can any help me?
>
> Many thanks
>
>
|
|
|
 |
michael weaver
|
| Posted: 01/06/2003, 12:17 PM |
|
If you add the second line you can set the downloaded filename (for an
attachment), or set the file to be viewed "inline"
Header("Content-type: application/vnd.ms-excel");
Header("Content-Disposition: attachment;
filename=\"your_datasheet_name.xls\"");
michael
"RonB" <r.borkent@123chello123.nl> wrote in message
news:av2iae$vg1$1@news.codecharge.com...
> Put this at the top of the php page ( or even better in an event):
> Header("Content-type: application/vnd.ms-excel");
> Now if you link to that page it will be opened in excel.
>
> That's all
>
> RonB
>
>
> "PJ" <apis@globalnet.co.uk> schreef in bericht
>news:av1t9j$mkd$1@news.codecharge.com...
> > I have seen somewhere a strip of code to insert into a page that will
> > convert php data to display an excel spreadsheet in the browser but lost
> > track of it.
> >
> > Can any help me?
> >
> > Many thanks
> >
> >
>
>
|
|
|
 |