Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML content from another file

Status
Not open for further replies.

Neily

Programmer
Joined
Jul 27, 2000
Messages
342
Location
GB
I am trying to create a web page that gets it's content from another file (A database, excel spreadsheet, text file etc.)

I have currently (for my purposes so this can be changed) created an Excel spreadsheet with the following headings:

Date - The date article is published.
Headline - The news story's headline.
ShortStory - A brief outline of what story is about.
ShowAsUpdate - If cell equals 'Y' or 'y' then this
is shown as an update story. Only first
five will be shown. If cell equals
anything else story will only appear on
News page.
Hyperlink - Hyperlink to the full news story page.
HyperlinkText - The HYPERLINK substituted for '<link>' in
ShortStory.
ImagePath - Path to an image to be shown for updates
part of home page.

When the web page is loaded I want it to look at this file and do any substitutions (i.e the hyperlink for <link>) and display the content as appropriate in the web page. I want it formatted in a certain way. It only has to do this for five of the stories that have been selected in ShowAsUpdate Column but selects only newest 5 if more selected.

The rest are to be loaded in a seperate news page but have just the Date, Headline and a link (more>>) printed on one line. Should look like this:

29/06/2001 - Headline: more>>

I'd like to be able to format this line too.

I am a newcomer to we programming but have used VisualBasic and other programs so I kno bits but this was too dificult for me!!

Many Thanks :)

Neil
 
To access an Excel spreadsheet from perl you need one of the library modules available at Other than that, if you know how to write programs this shouldn't be that difficult. What you'll need to do is instead of linking to a page, you'll link to your program. The program will print a &quot;Content-type: text/html\n\n&quot; header, and then just print all the html for the web page. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
The spreadsheet file is only used to part fill a web page. The area is currently a table on the htm file so this doesn't sound exactly like what you suggest.

Also I can program but not much. My strengths are in Visual Basic but nothing major!!

Thanks
Neil :)
 
For what you need to do I'm not sure perl is the way to go then. You may want to see if ASP or PHP would do the job better. Unless someone else knows of a way to do this that I don't?
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top