code to read flat file and make it html?
I have a ms excel sheet with 1500 lines in 3 columns. I want to publish it to the web, however, this file changes daily. i can save the file as a xml, html, xls, dbf file. the web server is an apache with php only.
is there a script that can dinamically read my file, parse it and display it as html?
Yes, there's an easy way but it has a very steep learning curve. And if you are new to HTML then you are going to need some help.
The basic idea is that you save your spead sheet as XML and then you use XML Style Sheet Language Transformations (XSLT) to transform the XML into HTML. The XSLT processors are written in Java and you can either transform the XML on your desktop and then upload the HTML or you can have your server do the transformation with each HTTP request. And if you really want to wow them, you can have a style sheet that transforms the XML into what are called Formatting Objects (FO). Then you can use an FO processor to generate a PDF version. It takes a lot of setting up, but once everything is in place the process just about runs itself.
Two good XSLT processors are Saxon (http://saxon.sourceforge.net/) and Xalan (http://xml.apache.org/xalan-j/). Saxon has the better help files. For an FO processor I like to use FOP (http://xml.apache.org/fop/).
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Well theres always text files im sure it should support that but im mostly with mysql so i wouldnt no
i will try saxon and post back to this list.
i hope it can come with a much cleaner code than the "save as" html/xml function in ms excel xp.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)