473,757 Members | 8,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3961
On 5 Mar, 04:41, i.arda.tez...@g mail.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.***********@g mail.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::Pa rseExcel 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
10928
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 search on the internet and found some VB6 code examples, but i don't think VB6 code is the same as VB.Net is it? I basically need to read the file in, storing the data (which is arranged in columns) into a 2Dimensional array. From there i want to...
6
18848
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 the data in the excel file that if the first character in the excel file cell is numeric it will read and write only numeric values only. If I sort the coloumn in the excel file and the first character in the cell read is alphanumeric then only...
1
4691
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 written the driver prg in c#. The code opens the file, but it is not writting the values from text file into excel file. I can not figure out the problem here. This is my code: StreamReader dataFileReader = null; FileInfo file = null;...
4
2614
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 looks has the following columns: Data Description / Source / 1990 / 1991 / 1992 / etc. It's set up as a pivot-table (at least I think so... not too familiar with Excel Pivot Tables), based on the first two columns. Anyway, when I run the
13
13251
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
22503
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 namespaces and classes should I use and how? -- dba123
4
3127
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 recordset and using the Excel file as a datasource and also as setting up an Excel object and stepping through that object's collections. (cells, rows, etc) Can anyone tell me which one is better and why? They both seem to work. Or perhaps,...
0
1815
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 writen i can read tru the document. All rows and colums... but there one fault.. ROW A has normal characters (like A-Z) but row C contains thai carakters (using font : Angsana New in EXCEL or WORD). When i run the following script i see the words on...
5
6083
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 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\test.xls;Extended Properties=Excel 8.0;" Dim myData As New OleDbDataAdapter("SELECT * FROM where t_id='5'", strConn) myData.TableMappings.Add("Table", "ExcelTest") myData.Fill(myDataset) Please let me know how...
0
10072
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9906
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9885
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9737
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8737
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7286
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6562
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5172
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2698
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.