Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

wwwxxxx.jpeg, xxxxdup, WWWXXX..APC site:board.issociate.de, WWWXXXAPC, WWWXXX .CMD, Wwwwxxx reemine, WWWXXX.VCBA, WWWXXX.VCBA, TheboL.wwwxxxxx, WWWXXXAPC

Links

XODOX
Impressum

#1: MySQL to EXCEL?

Posted on 2004-08-17 21:36:49 by Chris Payne

------=_NextPart_000_0000_01C48470.036F0EB0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi there everyone,



I'm having a dilemma (Now that I have power back after the hurricane hit us
directly in Orlando). Anyway, I need to export a database table to Excel, I
can do it as a .txt file without a problem, but I can't seem to get it to
put each column into a separate cell when I try to export as an .xls form, I
think I have this line formed incorrectly for an XLS file, can anyone see if
I need to use any special characters rather than a comma?



fwrite($filesession,"$id,$new,$recno,$category,$product,$des cription,$unit,$
certificate,$instock,$orderpt,$ordernow,$vendor,$unitcost,$u nitsell\015\012"
);



Thank you.



Chris


------=_NextPart_000_0000_01C48470.036F0EB0--

Report this message

#2: Re: MySQL to EXCEL?

Posted on 2004-08-17 21:53:02 by h.dudeness

> I'm having a dilemma (Now that I have power back after the hurricane hit us
> directly in Orlando). Anyway, I need to export a database table to Excel, I
> can do it as a .txt file without a problem, but I can't seem to get it to
> put each column into a separate cell when I try to export as an .xls form, I
> think I have this line formed incorrectly for an XLS file, can anyone see if
> I need to use any special characters rather than a comma?
>
> fwrite($filesession,"$id,$new,$recno,$category,$product,$des cription,$unit,$
> certificate,$instock,$orderpt,$ordernow,$vendor,$unitcost,$u nitsell\015\012"
> );
>


either output the data as a csv which you are doing (on windoze name
the file with a .csv extension) or take a look at
http://pear.php.net/package/Spreadsheet_Excel_Writer

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

Report this message

#3: Re: MySQL to EXCEL?

Posted on 2004-08-17 21:59:33 by Randy

You could always use phpMyAdmin...I believe it will export to Excel
(if not, CSV file).

http://phpmyadmin.sourceforge.net/



On Tue, 17 Aug 2004 15:36:49 -0400, Chris Payne
<chris_payne@planetoxygene.com> wrote:
> Hi there everyone,
>
> I'm having a dilemma (Now that I have power back after the hurricane hit us
> directly in Orlando). Anyway, I need to export a database table to Excel, I
> can do it as a .txt file without a problem, but I can't seem to get it to
> put each column into a separate cell when I try to export as an .xls form, I
> think I have this line formed incorrectly for an XLS file, can anyone see if
> I need to use any special characters rather than a comma?
>
> fwrite($filesession,"$id,$new,$recno,$category,$product,$des cription,$unit,$
> certificate,$instock,$orderpt,$ordernow,$vendor,$unitcost,$u nitsell\015\012"
> );
>
> Thank you.
>
>
> Chris
>
>


--
randy sesser@gmail.com

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

Report this message

#4: RE: MySQL to EXCEL?

Posted on 2004-08-17 22:55:29 by ed.lazor

> -----Original Message-----
> either output the data as a csv which you are doing (on windoze name
> the file with a .csv extension) or take a look at
> http://pear.php.net/package/Spreadsheet_Excel_Writer

I have another option that might work for you also. Go to MySQL's website
and grab their ODBC driver and use that to pull data directly into Excel.
That's what I do and the end result tends to be a lot cleaner than going
through cvs or other MySQL exports.

-Ed

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

Report this message

#5: Re: MySQL to EXCEL?

Posted on 2004-08-17 23:09:19 by h.dudeness

> I have another option that might work for you also. Go to MySQL's website
> and grab their ODBC driver and use that to pull data directly into Excel.
> That's what I do and the end result tends to be a lot cleaner than going
> through cvs or other MySQL exports.

I was not sure that this was a mysql db.

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

Report this message

#6: Re: MySQL to EXCEL?

Posted on 2004-08-17 23:33:17 by h.dudeness

> > I have another option that might work for you also. Go to MySQL's website
> > and grab their ODBC driver and use that to pull data directly into Excel.
> > That's what I do and the end result tends to be a lot cleaner than going
> > through cvs or other MySQL exports.
>
> I was not sure that this was a mysql db.

sorry for the second email, I see now in the subject of the email it
is mysql, stupid me.

You could also try an excel com object to do this.

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

Report this message

#7: Re: MySQL to EXCEL?

Posted on 2004-08-17 23:45:29 by Danbru

I don't know how you have it setup.

But you can create a XLS file on the fly using PHP....

By using header...

header("Content-Type: application/vnd.ms-excel");
header("Content-Dispostion: attachemnt; filename='Project.xls'");
header("Pragma: no-cache");
header("Expires: 0");


Then just echo your results from your query, like normal...


You have just created a XLS from PHP...Which can be saved to a XLS
Workbook...




Dan







On Aug 17, 2004, at 4:33 PM, h.dudeness@gmail.com wrote:

>>> I have another option that might work for you also. Go to MySQL's
>>> website
>>> and grab their ODBC driver and use that to pull data directly into
>>> Excel.
>>> That's what I do and the end result tends to be a lot cleaner than
>>> going
>>> through cvs or other MySQL exports.
>>
>> I was not sure that this was a mysql db.
>
> sorry for the second email, I see now in the subject of the email it
> is mysql, stupid me.
>
> You could also try an excel com object to do this.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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

Report this message

#8: RE: MySQL to EXCEL?

Posted on 2004-08-18 02:50:35 by ed.lazor

> -----Original Message-----
> From: Daniel Brunner [mailto:daniel.brunner@duni.com]
> Sent: Tuesday, August 17, 2004 2:45 PM
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] MySQL to EXCEL?
>
> I don't know how you have it setup.
>
> But you can create a XLS file on the fly using PHP....
>
> By using header...
>
> header("Content-Type: application/vnd.ms-excel");
> header("Content-Dispostion: attachemnt; filename='Project.xls'");
> header("Pragma: no-cache");
> header("Expires: 0");
>
>
> Then just echo your results from your query, like normal...

Could you expound on this? What field delimiter are you using?


>
>
> You have just created a XLS from PHP...Which can be saved to a XLS
> Workbook...

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

Report this message

#9: RE: MySQL to EXCEL?

Posted on 2004-08-18 03:22:11 by Jeffrey_N_Dyke

>>
>> I don't know how you have it setup.
>>
>> But you can create a XLS file on the fly using PHP....
>>
>> By using header...
>
>> header("Content-Type: application/vnd.ms-excel");
>> header("Content-Dispostion: attachemnt; filename='Project.xls'");
>> header("Pragma: no-cache");
>> header("Expires: 0");
>>
>>
>> Then just echo your results from your query, like normal...

> Could you expound on this? What field delimiter are you using?

You can use
<table>
<tr>
<td>

and each tr becomes an excel row and each td becomes a cell. This may or
may not work in/before excel97??

If you're looking to create true excel files, then i highly suggest
spreadsheetwrite_excel,
It is an excellent codeset, enabling you to use many features of excel such
as colors, math, formats, etc.

doing it this way, is little to no different from exporting in csv format,
but it does work
as described.

HTH
Jeff


>
>
> You have just created a XLS from PHP...Which can be saved to a XLS
> Workbook...

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

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

Report this message

#10: RE: MySQL to EXCEL?

Posted on 2004-08-18 06:41:44 by ed.lazor

> -----Original Message-----
>
> You can use
> <table>
> <tr>
> <td>
>
> and each tr becomes an excel row and each td becomes a cell. This may or
> may not work in/before excel97??
>
> If you're looking to create true excel files, then i highly suggest
> spreadsheetwrite_excel,
> It is an excellent codeset, enabling you to use many features of excel
> such
> as colors, math, formats, etc.
>
> doing it this way, is little to no different from exporting in csv format,
> but it does work
> as described.
>
> HTH
> Jeff

Wow, that's pretty interesting. I'll play around with it =)

-Ed

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

Report this message