RE: [PHP] Export to Excel

2001-07-13 Thread Kurt Lieber

Easiest way is to export the data into comma-delimited format. (.csv
files)  Excel can import those no problem.

So, you would write a php function that created a simple text file that
looked like:

Fieldname1,fieldname2,fieldname3
Data1,data2,data3
Etc.

And excel can open that kind of file right up.

Hth
--kurt

-Original Message-
From: Jorge Alvarez [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 13, 2001 9:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Export to Excel


One of my clients is requesting me to export some data from
PHP-generated pages to MS Excel files. I have no clue on how to do such
export with PHP. I'm using PHP/Apache/Linux Mandrake.

What options do I have?

Your help is very appreciated.

Regards,

Jorge Alvarez
--
Let your screen saver contribute to cancer research.
http://members.ud.com/vypc/cancer/
A new way to help. Sponsored by Intel.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Export to Excel

2001-07-13 Thread BELL, JASON (PB)

You could try writing the data out to a comma seperated file, and then offer
the file for download. Excel understands these files, and they are
plaintext, therefore easy to create.

Jason Bell

Jorge Alvarez [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 One of my clients is requesting me to export some data from PHP-generated
 pages to MS Excel files. I have no clue on how to do such export with PHP.
 I'm using PHP/Apache/Linux Mandrake.
 
 What options do I have?
 
 Your help is very appreciated.
 
 Regards,
 
 Jorge Alvarez 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Export to Excel

2001-07-13 Thread Neil Kimber

Dump to file as comma separated and then load into Excel. Excel reads comma
separated files. In the file open dialog you can select file type to be .txt
(csv).

If you want to be really sick then you can set up an ODBC connection to a
comma separated file and then use MSQuery inside Excel.

Another alternative is to dump out your data to a webpage in an HTML table.
Excel can link to the web page, just goto to Data-Get External Data-New
Web Query. Select the URL and you're away. This is quite a cool feature as
you don't have to send out updated files on a continual basis.

Enjoy.

-Original Message-
From: Jorge Alvarez [mailto:[EMAIL PROTECTED]]
Sent: 13 July 2001 17:58
To: [EMAIL PROTECTED]
Subject: [PHP] Export to Excel


One of my clients is requesting me to export some data from PHP-generated
pages to MS Excel files. I have no clue on how to do such export with PHP.
I'm using PHP/Apache/Linux Mandrake.

What options do I have?

Your help is very appreciated.

Regards,

Jorge Alvarez
--
Let your screen saver contribute to cancer research.
http://members.ud.com/vypc/cancer/
A new way to help. Sponsored by Intel.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Export to Excel

2001-07-13 Thread Brady Hegberg

Here's something I found on the PHP Code Exchange:

Generate Excel files from PHP by Christian Novak on 2000-11-25 11:47:24
(v for 4.0) is 1974 bytes.
Small function library to generate Excel files/stream directly from PHP.

http://px.sklar.com/code.html?code_id=488

I haven't tried it out...it doesn't look terribly sophisticated but it
might work.

Brady

 Dump to file as comma separated and then load into Excel. Excel reads comma
 separated files. In the file open dialog you can select file type to be .txt
 (csv).
 
 If you want to be really sick then you can set up an ODBC connection to a
 comma separated file and then use MSQuery inside Excel.
 
 Another alternative is to dump out your data to a webpage in an HTML table.
 Excel can link to the web page, just goto to Data-Get External Data-New
 Web Query. Select the URL and you're away. This is quite a cool feature as
 you don't have to send out updated files on a continual basis.
 
 Enjoy.
 
 -Original Message-
 From: Jorge Alvarez [mailto:[EMAIL PROTECTED]]
 Sent: 13 July 2001 17:58
 To: [EMAIL PROTECTED]
 Subject: [PHP] Export to Excel
 
 
 One of my clients is requesting me to export some data from PHP-generated
 pages to MS Excel files. I have no clue on how to do such export with PHP.
 I'm using PHP/Apache/Linux Mandrake.
 
 What options do I have?
 
 Your help is very appreciated.
 
 Regards,
 
 Jorge Alvarez
 --
 Let your screen saver contribute to cancer research.
 http://members.ud.com/vypc/cancer/
 A new way to help. Sponsored by Intel.
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Export to Excel

2001-07-13 Thread Boget, Chris

 Here's something I found on the PHP Code Exchange:
 Generate Excel files from PHP by Christian Novak on 
 2000-11-25 11:47:24 (v for 4.0) is 1974 bytes.
 Small function library to generate Excel files/stream 
 directly from PHP.
 http://px.sklar.com/code.html?code_id=488
 I haven't tried it out...it doesn't look terribly sophisticated but it
 might work.

I just tried it and it didn't work.  At least, not for Excel2k.  It
created an .xls file but it wasn't something that could be opened
and read by my version of XL.

Chris



Re: [PHP] Export to Excel

2001-07-13 Thread Aaron Bennett

Interesting... I have excel2k, and it worked fine for me... The only thing i
can think of is maybe some extra garbage you get when it generates the
file... maybe headers?
--
Aaron Bennett
[EMAIL PROTECTED]

- Original Message -
From: Boget, Chris [EMAIL PROTECTED]
To: 'Brady Hegberg' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: Jorge Alvarez [EMAIL PROTECTED]
Sent: Friday, July 13, 2001 11:33 AM
Subject: RE: [PHP] Export to Excel


  Here's something I found on the PHP Code Exchange:
  Generate Excel files from PHP by Christian Novak on
  2000-11-25 11:47:24 (v for 4.0) is 1974 bytes.
  Small function library to generate Excel files/stream
  directly from PHP.
  http://px.sklar.com/code.html?code_id=488
  I haven't tried it out...it doesn't look terribly sophisticated but it
  might work.

 I just tried it and it didn't work.  At least, not for Excel2k.  It
 created an .xls file but it wasn't something that could be opened
 and read by my version of XL.

 Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Export to Excel

2001-07-13 Thread Reuben D Budiardja

Hmm, I tried it, and my excel 2k could not read it either. I even change the 
echo to fwrite, and delete all the headers. What did you do to your source 
code? just copy it or did you modify it?
Could you possibly send it to me off list?

Thanks
Reuben D. Budiardja

On Friday 13 July 2001 01:36 pm, Aaron Bennett wrote:
 Interesting... I have excel2k, and it worked fine for me... The only thing
 i can think of is maybe some extra garbage you get when it generates the
 file... maybe headers?
 --
 Aaron Bennett
 [EMAIL PROTECTED]

 - Original Message -
 From: Boget, Chris [EMAIL PROTECTED]
 To: 'Brady Hegberg' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Cc: Jorge Alvarez [EMAIL PROTECTED]
 Sent: Friday, July 13, 2001 11:33 AM
 Subject: RE: [PHP] Export to Excel

   Here's something I found on the PHP Code Exchange:
   Generate Excel files from PHP by Christian Novak on
   2000-11-25 11:47:24 (v for 4.0) is 1974 bytes.
   Small function library to generate Excel files/stream
   directly from PHP.
   http://px.sklar.com/code.html?code_id=488
   I haven't tried it out...it doesn't look terribly sophisticated but it
   might work.
 
  I just tried it and it didn't work.  At least, not for Excel2k.  It
  created an .xls file but it wasn't something that could be opened
  and read by my version of XL.
 
  Chris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]