473,403 Members | 2,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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
2 3890
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Nick Hoare | last post by:
Hi, i am new to VB.Net and really enjoying the trip so far =) However I have this problem: I was wondering if anyone is familiar with how to go about reading in an Excel ".csv" file? I had a...
6
by: Paul | last post by:
I was wondering if anyone has had an issue where using vba code to read an excel file and import the data into an access table some records are not imported from the excel file. It seems looking at...
1
by: mail2atulmehta | last post by:
Hi, I do not know if this is right place for this, but i need some help. I have a text file, whose values are seprated by a delimiter. I want to open this file in excel, ( not import it) . I have...
4
by: Michael C# | last post by:
Hi all, I have a little program that uses OleDb to open and read an Excel spreadsheet from VB.NET. The problem I'm running into is it's not reading the column headers... The Excel worksheet...
13
by: nuti | last post by:
Hi all, I am fairly new to VB.I am trying to figure out as how to write a script so that i can read the data from an excel sheet to Access. can u guys please help me out? cheers, nuti
9
by: dba123 | last post by:
I need some help and direction on what classes and an example or two (article) on how to read an Excel Worksheet and insert one column into a database table column. I am using .NET 2.0 only. What...
4
by: BerkshireGuy | last post by:
I need to import an Excel file. For reasons I won't get into, I cannot just link to the file or do an import specification, so I need to do it via code. I know of two ways of doing this - via a...
0
by: Eric | last post by:
Hi all, First i appoligise for my bad english. For a friend i need to create a script that can read XLS documents. Well that's not the problem anymore... with the code (down here) i've already...
5
by: SantaClaus | last post by:
Hi all, I'm reading an excel file in VB.net. It works fine if I don't give any condition in the 'where' claus. My code is Dim myDataset As New DataSet() Dim strConn As String =...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.