467,910 Members | 1,672 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,910 developers. It's quick & easy.

Reading excel table into PHP

Hello,

I'm trying to make a web page that will read the xls file and make a
table out of it on the web page. I want to change the excel file from
time to time and I want the changes to be updated on the website
dynamically. If it is possible to do it by writing a few lines of
codes into the php file to make it read the data in the xls into the
web page, how can it be done?

If not, what would be the best way to do it?
Arda~
Mar 5 '08 #1
  • viewed: 3700
Share:
2 Replies
On 5 Mar, 04:41, i.arda.tez...@gmail.com wrote:
I'm trying to make a web page that will read the xls file and make a
table out of it on the web page.
If it is possible to do it by writing a few lines of
codes into the php
Easy way:

* Use a Windows server

* Install Excel (cost!) on this server

* Write server-side web code that uses COM (M$oft technology, pretty
easy) to access Excel as a COM component.

** Use Windows web scripting tools (IIS / JScript) to do this COM work
(very easy)

** Use PHP and a COM bridge module to access COM work (not quite so
easy)

* Use the web scripting language to generate a HTML table.

I would _NOT_ do this. It needs an Excel licence (expensive), it needs
Excel installed in the back-end (security risk) and it needs Windows
running on a server. However it is very easy to do, especially if
you're already a M$oft shop.
Allternatively I would write some VBA _within_ Excel to dump the XLS
content out as XML (Maybe even as XHTML). I would run this Excel
macro on my desktop, and it would upload the resulting file to a
fileserver or ftp server that could be accessed by the web server
(which could now be pure LAMP, with no Windows)

If I wanted sophistication, the web server would then run an XSLT
transform on this result, to make the page look exactly how I wanted
it.
I would also _NOT_ try to use any non-M$oft product that accessed
Excel file formats directly. M$oft Office file formats are proprietary
and unstable. Building tools that depend on them keeping the same
format over time is just asking for trouble.
Mar 5 '08 #2
i.***********@gmail.com wrote:
Hello,

I'm trying to make a web page that will read the xls file and make a
table out of it on the web page. I want to change the excel file from
time to time and I want the changes to be updated on the website
dynamically. If it is possible to do it by writing a few lines of
codes into the php file to make it read the data in the xls into the
web page, how can it be done?

If not, what would be the best way to do it?

Do not use PHP but Perl and module Spreadsheet::ParseExcel or other module
from Spreadsheet family.
http://search.cpan.org/~kwitknr/Spre...eExcel-0.2603/

--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>

Mar 6 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Nick Hoare | last post: by
1 post views Thread by mail2atulmehta | last post: by
9 posts views Thread by dba123 | last post: by
4 posts views Thread by BerkshireGuy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.