www.webdeveloper.com
Results 1 to 4 of 4

Thread: code to read flat file and make it html?

  1. #1
    Join Date
    Feb 2003
    Posts
    2

    Question 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?

    i dont know if i have to use javascript, php o else...also i am very new to web building.

    thanks,
    erick.

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    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

  3. #3
    Join Date
    Feb 2003
    Location
    PA,USA
    Posts
    37
    Well theres always text files im sure it should support that but im mostly with mysql so i wouldnt no

  4. #4
    Join Date
    Feb 2003
    Posts
    2
    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.

    thanks,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles