Click here to get back home

PHP / MySQL to Excel - good library recommendation?

 HomeNewsGroups | Search

comp.lang.php - PHP programming language discussions 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
PHP / MySQL to Excel - good library recommendation? <news.freedom2surf.net> 05-18-2009
Posted by <news.freedom2surf.net> on May 18, 2009, 7:24 am
Please log in for more thread options
Hi,
I have a project which is a PHP / MySQL application that is going to have to
put lots of Excel spreadsheets. I was hoping it would not be necessary but
it is unavoidable.

Therefore I'm looking for some good libraries out there that will make this
as easy and robust as possible. Don't even mind if I have to pay a
reasonable amount if it really does make a difference.

note also would be hoping to do some complex stuff such set column sizes and
maybe even marked cells as locked.

Is there anything out there that can do this?

Thanks



Posted by =?ISO-8859-1?Q?=22=C1lvaro_G=2 on May 18, 2009, 7:50 am
Please log in for more thread options
news.freedom2surf.net escribió:
show/hide quoted text

It depends on whether you need a specific Excel version. PEAR's
Spreadsheet_Excel_Writer package [1] works reasonably well for BIFF5
format (Excel 5.0) but the project is dead. PHP Excel [2] supports Excel
2007 and it seems quite active.



[1] http://pear.php.net/package/Spreadsheet_Excel_Writer
[2] http://www.codeplex.com/PHPExcel

--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Posted by C. (http://symcbean.blogspot.c on May 18, 2009, 3:51 pm
Please log in for more thread options
show/hide quoted text
to
show/hide quoted text
t
show/hide quoted text
is
show/hide quoted text

Sorry but integrating Microsoft Office products with **anything else**
does not fit in the same sentance as "easy" or "robust". Excel is
however, the least bad. Don't even try to generate native files if you
value your sanity/career. If you can't solve your problems using csv
format files, then build a spreadsheet calling ODBC directly.

show/hide quoted text
and
show/hide quoted text

No chance - build your spreadsheet and put a datasource in it. You
could try sedding it with replaceable macros (text macroes - not VBA)
and saving it as an HTML file then running a pref/str_ replace on it -
but
1) it'll be impossible to add rows - just change the macros you put in
their in the firtst place
2) it'll probably fall apart in totally mysterious and unplanned for
ways
3) it'll be really difficult to maintain

show/hide quoted text

OpenOffice? PDF? Lotus 123 (yes, IBM publish a full spec of the file
format).

C.

Posted by <news.freedom2surf.net> on May 18, 2009, 4:23 pm
Please log in for more thread options



show/hide quoted text


show/hide quoted text

This does not sound good news. Expanding on your suggestion some more I want
to know more about "build a spreadsheet calling ODBC directly"

Where can I find more about this? Does this method allow me to insert images
into Cells and can I insert rows.

Any method that does not allow me to insert rows is completely useless to
me.

Actually the file does not HAVE to be excel format, as long at it can be
opened in Excel and the format dictated. So for example if there is a way I
can create an openOffice file that would be readable in Excel and the
results be predictable this would be acceptable?

What do you think now with that further information.

Finally you mention PDF. My understanding is that creating a PDF file from
PHP / MySQL is no easy feat either?

Thanks


Posted by C. (http://symcbean.blogspot.c on May 19, 2009, 7:23 am
Please log in for more thread options
show/hide quoted text

http://www.lmgtfy.com/?q=excel+odbc+query

show/hide quoted text

You can't insert images into cells natively in Excel - so you
certainly won't be able to do it via any API / File format.

show/hide quoted text

Which also eliminates the possiblity of using Excel as an ODBC
datasource.

show/hide quoted text

Microsoft Products don't integrate well with products from other
vendors. Some people think this is a deliberate strategy - see also
http://catb.org/esr/halloween/halloween1.html

It currently has no support for OASIS, and given the bad feeling about
how the "Open XML" accreditation process was progressed, there is not
likely to be any method of converting files in the near future.

Lotus 123 might work, given the restraints on image handling in Excel.

show/hide quoted text

It's a walk in the park compared with what you are proposing.

C.

Similar ThreadsPosted
Recommendation for a PHP ORM library? July 3, 2008, 10:23 pm
recommendation for a good mail form? January 23, 2005, 9:45 pm
Need MySQL management tool recommendation March 14, 2005, 12:26 pm
Application Recommendation: PHP/MySQL Clinet Contact Management SW December 15, 2005, 8:20 pm
Excel to MySQL through PHP? April 1, 2006, 4:27 pm
MySQL -> PHP -> MS Excel? November 25, 2008, 1:49 pm
MySQL as Excel? February 3, 2009, 6:50 pm
Export mysql data to excel? March 10, 2008, 6:03 am
Exporting MySQL Data to Excel using PHP January 5, 2009, 10:18 am
Import Excel file into MySQL database September 3, 2004, 2:27 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Driving a better car - Fuelzilla.com

Cabling site for homeowners and pros alike - Cabling-Design.com

Friends:

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap
Privacy Policy