MySQL -> PHP -> MS Excel? - Page 2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: MySQL -> PHP -> MS Excel?

sheldonlg wrote:
Quoted text here. Click to load it

Which completely depends on the client's settings.  It may or may not
perform the same as on your system.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: MySQL -> PHP -> MS Excel?

Quoted text here. Click to load it

Why bother?  If you declare your MySQL database as an ODBC source,
you should be able to query it from Excel directly...


Re: MySQL -> PHP -> MS Excel?

me wrote:
Quoted text here. Click to load it

I personally don't have a problem with ANY of the suggests made in these
threads , all valid .

The original poster wants a method to export mysql data to xls format
in a file so his boss can just double click it and it opens no issue.

If you have scoured the internet , googled your brains out regrading xls
and php you have probably discovered that there is no practical solution
to do this in php. I have tried to do php->xls ( pure xls ) stuff
before. There are classes around but none did much more then spew out a
file that then needs to be converted in excel when opened.( causing the
good old conversion window up)

Now the original poster never mentions what version of excel he has to
play with , Excel 2007 uses a new xml type of file format , php is more
equipped to handle that

i would suggest you google :php excel

the first two results /

both these projects deal with the xml file version of excel
try these
** DISCLAIMER :  I have not tested these so it is unknown if they will
work for you.

If that is not good for you ,then perhaps you need to look at a
different platform.

I hate myself for even thinking this, think about using C# or some-other
Microsoft programming languages they can connect to a mysql db and its
more likely that they will  be able to export to .xls natively ( no
guarantee as I'm not a windows programmer)

I suggest if you can find a excel newsgroup/forum they may have a better
solution. I'm sure this problem is common  and people have solutions for
you somewhere.

regards trookat

Re: MySQL -> PHP -> MS Excel?

trookat wrote:
Quoted text here. Click to load it

Yikes, no need to join the dark side! Both Perl and Python are pretty
handy with the ole XLS format too...

There are ways of using both Perl and Python from PHP so you needn't
switch platforms to use them.

Best regards,


Re: MySQL -> PHP -> MS Excel?

r0g wrote:
Quoted text here. Click to load it

I agree that I may have slightly dipped my toes into the forces of evil
by suggesting a MS product, however one can only recommend what one knows.

To be honest I gave up using perl about when php 3 was released so I
keep forgetting that it may be option. Thats what happens when you get
old and lazy lol


( Although ,I'm only 31 so I'm not THAT old, having a disability makes
you age , it also gives me start posting in newsgroups and pretending
I'm doing something useful with my time, like making a wiki system that
I could have just downloaded ..... sorry bout that some monkey must have
got the peanuts out and ran round my head .... I now return you to your
regular television programming.

Re: MySQL -> PHP -> MS Excel?

Quoted text here. Click to load it

Although I couldn't recommend a specific component, I've used many of
the classes from and found them to
be reasonably good.


Re: MySQL -> PHP -> MS Excel?

Quoted text here. Click to load it

Unfortunately, there are a lot of solutions out there but none of them
don't feel like a hack and none of them are as robust as you'd
probably like.  If you're on Windows, you can probably connect to
Excel from PHP via COM but I don't know of an easy/simple way to do it
on Linux. Maybe if you're open to a 2-step solution, you could write a
connector in C# using Mono then feed XML or regular text data to it
and have IT create the Excel file.

Like I said, nothing clean and robust unfortunately.

Anthony Papillion

Site Timeline