RE: Exporting data in mysql to an excel sheet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sunit's solution is certainly a new one on me - I hadn't realised you could
pump HTML tables directly into Excel.

To answer your question, once you've created the file, use Sunit's headers to
tell the browser that it's about to receive an Excel file, then use
readfile() to output the contents of the XLS file to the browser.

There's a good example of this at
http://uk3.php.net/manual/en/function.readfile.php by 'antispam [at] rdx page
[dot] com'

Rob. 

-----Original Message-----
From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] On
Behalf Of Emrah Özcan
Sent: 30 October 2007 21:12
To: php-objects@xxxxxxxxxxxxxxx
Subject: RE:  Exporting data in mysql to an excel sheet

Hi Rob,

Thanks for the class address. What about saving the same file in the client
side? This one saves it in the server...

 

Thanks in advance,

 

Emrah

 

From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] On
Behalf Of Atkinson, Robert
Sent: Tuesday, October 30, 2007 8:54 PM
To: php-objects@xxxxxxxxxxxxxxx
Subject: RE:  Exporting data in mysql to an excel sheet

 

There's a class on phpclasses.org
(http://www.phpclasses.org/browse/package/2037.html) that can be used to
create Excel files.

Rob.

________________________________

From: php-objects@xxxxxxxxxxxxxxx <mailto:php-objects%40yahoogroups.com>  on
behalf of Sudhakar
Sent: Sun 10/28/2007 10:31 AM
To: php-objects@xxxxxxxxxxxxxxx <mailto:php-objects%40yahoogroups.com> 
Subject:  Exporting data in mysql to an excel sheet

I have developed a reporting page using php which will display the
number of records from a table to the browser. This works fine,
however i would like to provide user an option where
1. they can view the report in an excel sheet which can be opened or
saved with a dialog box and
2. i would like the field names to be added in the first row of the
excel sheet exactly how it happens while exporting a table from Myphp
admin interface.

Please provide the code for this. Any help will be greatly appreciated.

****************************************************************************
*******
Any opinions expressed in email are those of the individual and not
necessarily those of the company. This email and any files transmitted with
it are confidential and solely for the use of the intended recipient 
or entity to whom they are addressed. It may contain material protected by
attorney-client privilege. If you are not the intended recipient, or a
person responsible for delivering to the intended recipient, be advised that
you have received this email in error and that any use is strictly
prohibited.

Random House Group + 44 (0) 20 7840 8400
http://www.randomhouse.co.uk
http://www.booksattransworld.co.uk 
http://www.kidsatrandomhouse.co.uk
Generic email address - enquiries@xxxxxxxxxxxxxxxxx
<mailto:enquiries%40randomhouse.co.uk> 

Name & Registered Office:
THE RANDOM HOUSE GROUP LIMITED
20 VAUXHALL BRIDGE ROAD
LONDON
SW1V 2SA
Random House Group Ltd is registered in the United Kingdom with company No.
00954009, VAT number 102838980
****************************************************************************
*******

[Non-text portions of this message have been removed]

 



[Non-text portions of this message have been removed]



PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux