EXCEL DATA TO HTML, XML, PHP ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
TRUCKIN
Forum Newbie
Posts: 4
Joined: Sun Aug 29, 2004 7:24 pm

EXCEL DATA TO HTML, XML, PHP ?

Post by TRUCKIN »

Dose anyone know how to convert excel data to html, xml, php ? Any info would be helpfull thanks... :D
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

save it as HTML from Excel :)
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

I had to write an import function once - Excel to Postgres DB database. Ended up writing a PERL script to do it using a ParseExcel perl module available on the web. Helped me actually check the data as it was being coverted. The PERL code was called from php.
jakobdoppler
Forum Commoner
Posts: 46
Joined: Wed May 21, 2003 6:16 pm

Post by jakobdoppler »

what about thinking about the framework ?

think about saving your excel files as .csv and simply use php's file access/manipulation functions. :-)

_yak
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

CSV and Save as HTML can be useful but depends on the client wishes. It's an extra step many do not want. Often you will get asked "Why can't you take this as it is? NotherCompany would".
The problem is compounded if you have non-technical users.
TRUCKIN
Forum Newbie
Posts: 4
Joined: Sun Aug 29, 2004 7:24 pm

Post by TRUCKIN »

User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

You could just use the CSV file and read it in with http://php.net/fgetcsv then you are free to do what you want with the data, save it as XML, output HTML, store it in a db etc..etc.
TRUCKIN
Forum Newbie
Posts: 4
Joined: Sun Aug 29, 2004 7:24 pm

Post by TRUCKIN »

Ok i got this so far http://www.i-drum.com/ReadCSV.php

how do i make a template for it and the pics from the zzsound data base should be showing up oh! oh! and what about the links :wink: hehehehe.......
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

If going the CSV route ignore the following....

The module linked to is the module I used with PERL to directly translate an Excel File. Found it really easy apart from one glitch on an old version of Excel (OK was actually OpenOffice) where cell can not be greater than 255 characters. Wasn't a problem for me as data was not that large.
Post Reply