Re: [PHP-DB] Exporting mySQL to Excel

2011-11-09 Thread Richard Quadling
On 9 November 2011 23:52, Matijn Woudt  wrote:
> On Thu, Nov 10, 2011 at 12:32 AM, Ron Piggott
>  wrote:
>>
>> I am wondering how phpmyadmin makes Excel files "on the fly" --- Is it a
>> class?
>>
>
> They used PHPExcel in the past, but they had to remove because of
> license issues. Don't know what they're currently using, but if you
> can live with LGPL, PHPExcel might be an option.
>
> Matijn
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

If you can specify a TAB delimited file (assuming you don't have tab
characters in your data), then this is a slight upgrade to CSV.



-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc : Fantasy Shopper
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
fan.sh/6/370

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Exporting mySQL to Excel

2011-11-09 Thread Matijn Woudt
On Thu, Nov 10, 2011 at 12:32 AM, Ron Piggott
 wrote:
>
> I am wondering how phpmyadmin makes Excel files "on the fly" --- Is it a
> class?
>

They used PHPExcel in the past, but they had to remove because of
license issues. Don't know what they're currently using, but if you
can live with LGPL, PHPExcel might be an option.

Matijn

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Exporting mySQL to Excel

2011-11-09 Thread Jim Giner
The problem you are describing is where the fields are not enclosed in 
quotes.  Are you specifying to enclose alpha type fields in quotes, and 
leaving number-only fields without? 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Exporting mySQL to Excel

2011-11-09 Thread Ron Piggott

I have tried to implement a CSV solution.

Following a CSV header each field is displayed using this syntax: (Except 
the last doesn't end with a , but \r\n )


echo "\"" . trim( str_replace( '"' , '""' , stripslashes( 
mysql_result($listing_result , $i , 
"ministry_profiles.address_line_1") ) ) ) . "\" , ";


I have these 2 problems:

- Excel isn't providing a popup screen for me to specify the content of each 
field is contained within a pair of "  and , is used to separate each field.
- Additionally Excel is interpreting a comma as the start of a new field. 
This is problematic in fields where a comma legitimately exists in the 
middle of a field.


I am wondering how phpmyadmin makes Excel files "on the fly" --- Is it a 
class?


I am unsure how to proceed.


Ron Piggott



www.TheVerseOfTheDay.info

-Original Message- 
From: Jimi Thompson

Sent: Tuesday, November 08, 2011 4:59 PM
To: Ron Piggott
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Exporting mySQL to Excel

The best option I've found is to write to a file that is then sent to
the browser for download.  Are there others?  Yes but that's the one
I've had the best experience with.  It seems to work reliably regardless
of browser or version of Office or any thing else.

HTH!

On Tue, 2011-11-08 at 13:31 -0500, Ron Piggott wrote:
What is the preferred method used to export mySQL to Excel within the 
context of PHP?  I have looked on Google and found a wide variety of 
options.  Ron



Ron Piggott



www.TheVerseOfTheDay.info



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Exporting mySQL to Excel

2011-11-09 Thread Richard Quadling
On 8 November 2011 18:31, Ron Piggott  wrote:
> What is the preferred method used to export mySQL to Excel within the context 
> of PHP?  I have looked on Google and found a wide variety of options.  Ron
>
> Ron Piggott

If the mysql server is set to allow remote access, then you could use
ODBC and Excel to grab the data directly.

Alternatively, if you have SSH or some sort of tunnelling capability,
then with the tunnel in place, it would look like a local connection
and again, ODBC with Excel could be your answer.

I use NaviCat Lite to connect to mysql servers running inside Amazon's
cloud services.

I also Putty to create the tunnel and map the connection to allow the
GoodData client to gather data from the mysql server for further
reporting at GoodData.

-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc : Fantasy Shopper
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
fan.sh/6/370

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Exporting mySQL to Excel

2011-11-08 Thread Karl DeSaulniers

CSV is probably the least bloated. IMHO.
But I guess it depends on what your trying to get as an end result.

Best,
Karl

On Nov 8, 2011, at 3:59 PM, Jimi Thompson wrote:


The best option I've found is to write to a file that is then sent to
the browser for download.  Are there others?  Yes but that's the one
I've had the best experience with.  It seems to work reliably  
regardless

of browser or version of Office or any thing else.

HTH!

On Tue, 2011-11-08 at 13:31 -0500, Ron Piggott wrote:
What is the preferred method used to export mySQL to Excel within  
the context of PHP?  I have looked on Google and found a wide  
variety of options.  Ron



Ron Piggott



www.TheVerseOfTheDay.info




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Exporting mySQL to Excel

2011-11-08 Thread Jimi Thompson
The best option I've found is to write to a file that is then sent to
the browser for download.  Are there others?  Yes but that's the one
I've had the best experience with.  It seems to work reliably regardless
of browser or version of Office or any thing else.  

HTH!

On Tue, 2011-11-08 at 13:31 -0500, Ron Piggott wrote:
> What is the preferred method used to export mySQL to Excel within the context 
> of PHP?  I have looked on Google and found a wide variety of options.  Ron

> Ron Piggott
> 
> 
> 
> www.TheVerseOfTheDay.info 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Exporting mySQL to Excel

2011-11-08 Thread Ron Piggott


Trying to setup so within the administration screen the users may download 
the database.





Ron Piggott



www.TheVerseOfTheDay.info

-Original Message- 
From: Bastien Koert

Sent: Tuesday, November 08, 2011 1:33 PM
To: Ron Piggott
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Exporting mySQL to Excel

On Tue, Nov 8, 2011 at 1:33 PM, Bastien Koert  wrote:

On Tue, Nov 8, 2011 at 1:31 PM, Ron Piggott
 wrote:
What is the preferred method used to export mySQL to Excel within the 
context of PHP?  I have looked on Google and found a wide variety of 
options.  Ron


Ron Piggott



www.TheVerseOfTheDay.info



phpmyadmin supports this easily

--

Bastien

Cat, the other other white meat



or if you are creating some report, i have used both CSV files and PHP
EXCEL to create the output

--

Bastien

Cat, the other other white meat 



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Exporting mySQL to Excel

2011-11-08 Thread Bastien Koert
On Tue, Nov 8, 2011 at 1:33 PM, Bastien Koert  wrote:
> On Tue, Nov 8, 2011 at 1:31 PM, Ron Piggott
>  wrote:
>> What is the preferred method used to export mySQL to Excel within the 
>> context of PHP?  I have looked on Google and found a wide variety of 
>> options.  Ron
>>
>> Ron Piggott
>>
>>
>>
>> www.TheVerseOfTheDay.info
>>
>
> phpmyadmin supports this easily
>
> --
>
> Bastien
>
> Cat, the other other white meat
>

or if you are creating some report, i have used both CSV files and PHP
EXCEL to create the output

-- 

Bastien

Cat, the other other white meat

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Exporting mySQL to Excel

2011-11-08 Thread Bastien Koert
On Tue, Nov 8, 2011 at 1:31 PM, Ron Piggott
 wrote:
> What is the preferred method used to export mySQL to Excel within the context 
> of PHP?  I have looked on Google and found a wide variety of options.  Ron
>
> Ron Piggott
>
>
>
> www.TheVerseOfTheDay.info
>

phpmyadmin supports this easily

-- 

Bastien

Cat, the other other white meat

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Exporting mySQL to Excel

2011-11-08 Thread Ron Piggott
What is the preferred method used to export mySQL to Excel within the context 
of PHP?  I have looked on Google and found a wide variety of options.  Ron

Ron Piggott



www.TheVerseOfTheDay.info