Help - Search - Members - Calendar
Full Version: HTML Tables transfer to web site
HTMLHelp Forums > Programming > Databases
aussietaff
Hi Everyone
I realise that I don't know much about HTML because I have always used Net Objects Fusion which is a WYSIWYG Editor. Now I have been given a Data Feed that is a CSV.

I have converted this CSV. to HTML Tables, can anyone tell me how I go about using these HTML Tables, so that I can install them in my web site, so that I can display this Data Feed for all to see.

Help and advice would be very much appreciated.
Regards to all
Aussietaff excl.gif
Darin McGrew
I don't understand. Why can't you just put HTML documents with the tables on your web site, just like any other HTML document?
aussietaff
Hi Darin
When the CSV is converted to HTML Tables it is basically the same as when it was CSV, just the same Text except that the text is inside Boxes and when I enter them in the HTML Source, of course it just comes out the same, text inside boxes. As there is no HTML coding to make it look as it should look, when it is shown in the browser.
Thanks anyway for the comment.
Brian Chandler
It's very hard to understand what the problem is -- can you give the URL of the page you have, then say what's wrong with it?
moo
Are you basically saying: "I've got these tables. How do I embed them in a HTML page and then, how do I control how they look?"

If so see the FAQ on html basics: http://htmlhelp.com/faq/html/basics.html#basicstoc
tables: http://htmlhelp.com/faq/html/tables.html#tablestoc
and CSS: http://www.hwg.org/resources/faqs/cssFAQ.html
richard.williams
Use biterscripting to generate HTML table from a CSV file.

Let's say the following.

QUOTE

- You have data in a CSV file at C:/Temp/X.csv.
- You want to create an html page at C:/Temp/Y.html .


Fair enough. Here is a quick script.
CODE

set $wsep = ","

# Read .csv data into a variable.
var str input; cat "C:/Temp/X.csv" > $input

# Create table header.
var str output; echo "<table width=200>" >> $output

# Read rows one by one
while ($input <> "")
do
   var str row; lex -e "1" $input > $row

   # Write row header
   echo "<tr>" >> $output

   # Read columns one by one
   while ( $row <> "")
   do
      # Write next column header, column data, column footer.
      var str column; wex -e "1" $row > $column
      echo ("<td>"+$column+"</td>\n") >> $output
   done # done processing columns

   # Write row footer
   echo "</tr>\n\n" >> $output
done # done processing rows

# Write table footer.
echo "</table>" >> $output

# HTML table is in $output. Write to file with <html> and </html>.
echo ("<html>\n"+$output+"</html>") > "C:/Temp/Y.html"


I recommend you take a look at biterscripting. It installs very quickly. Follow instructions at http://www.biterscripting.com/install.html . It is free.

Take care.

Richard
Brian Chandler
QUOTE
I recommend you take a look at biterscripting. It installs very quickly. Follow instructions at http://www.biterscripting.com/install.html . It is free.


How would you compare biterscripting with PHP (or Perl)? In what ways is it better?
aussietaff
Thanks guys, I have been taking in all that has been said. I am now getting the hang of things, it is starting to fall into place. Thanks everyone for your help. biggrin.gif


This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.