Export excel --> html - How to clean html?  | | |
April 10th, 2004, 01:25 AM
|
#11 (permalink)
| | Member
Join Date: Oct 2001 Location: Adelaide, South Aust
Posts: 461
|
Well, it's a price list that comes to me direct from the wholesaler. I'm looking for an easy way to get that information (in a reasonably attractive format) onto the site. I also need a way to repeat the process at least monthly. Perhaps there's a better way?
__________________
Bill S.
Editor
BuickStreet.com
V8PC.com/web <-- logo comp
|
| |
April 10th, 2004, 08:42 AM
|
#12 (permalink)
| | 1010011010
Join Date: Oct 2001 Location: Chicagoland IL
Posts: 3,249
| Quote: Originally posted by BITM@D Well, it's a price list that comes to me direct from the wholesaler. I'm looking for an easy way to get that information (in a reasonably attractive format) onto the site. I also need a way to repeat the process at least monthly. Perhaps there's a better way? | Learn ASP, you will be able to put the database (spreadsheet) on the server, create a DSN to link the spreadsheet info, and create some relatively simple code (to do the data formating and import the records) will import the data from the spreadsheet. Whenever the spreadsheet info is updated, your web page will be automatically updated. Probably the simplest book I've come across is "ASP for Dummies" (from the yellow & black "... for Dummies" series). I'll bet you could self-teach yourself everything you'd need in less than five days.
__________________
"The trouble with our liberal friends is not that they're ignorant; It's just that they know so much that isn't so." -- Ronald Reagan
|
| |
April 10th, 2004, 10:52 PM
|
#13 (permalink)
| | Member
Join Date: Oct 2001 Location: Adelaide, South Aust
Posts: 461
|
Thanks for the suggestion.
I'll look around for an asp programer. I don't have the time or the inclination to learn a new language unless someone sells a ready to go solution that anyone is aware of. |
| |
April 11th, 2004, 12:04 AM
|
#14 (permalink)
| | Did you try Google yet?
Join Date: Feb 2003 Location: Buckhannon, WV
Posts: 3,468
|
__________________
My computer is bigger than yours!
|
| |
April 12th, 2004, 10:18 AM
|
#15 (permalink)
| | Senior Member
Join Date: Apr 2003 Location: Albany, NY
Posts: 623
|
Okay, try this. It's the VB code for a macro you can add to your Excel file:
Sub Export2HTML()
Dim Printstring As String
Dim r As Long
Dim c As Long
Dim WebpageName As Variant
Dim WebpageFile As String
WebpageName = Application.GetSaveAsFilename( _
fileFilter:="Web pages (*.htm), *.htm")
If WebpageName = False Then Exit Sub
WebpageFile = Replace(WebpageName, ".html", "")
WebpageFile = Replace(WebpageFile, ".htm", "")
WebpageFile = WebpageFile & ".htm"
Open CStr(WebpageFile) For Output As #1
Print #1, "<HTML>"
Print #1, "<BODY>"
Print #1, "<TABLE align=left border=1 cellPadding=2 cellSpacing=1 width=""100%"">"
Print #1, "<TBODY>"
For r = Selection(1).Row To _
Selection(1).Row + Selection.Rows.Count - 1
Print #1, "<TR>"
For c = Selection(1).Column To _
Selection(1).Column + Selection.Columns.Count - 1
Print #1, "<TD vAlign=top>" & Cells(r, c).Text & "</TD>"
Next
Print #1, "</TR>"
Next
Print #1, "</TBODY></TABLE>"
Print #1, "</BODY>"
Print #1, "</HTML>"
Close #1
ActiveWorkbook.FollowHyperlink WebpageFile
End Sub |
| |
April 12th, 2004, 09:58 PM
|
#16 (permalink)
| | Member
Join Date: Oct 2001 Location: Adelaide, South Aust
Posts: 461
|
Cool, thanks. Though I'm not quite sure what to do with it. Can you explain the basic steps? I have zero macro or vb script experience. I write my own html and edit some javascripts I use but that's about it.
In any case, I'll copy the script and ask a few guys at work if they know what to do with it. Thanks for the work though. I'll look at it some more and see if I can learn anything about this code. It looks intersting. |
| |
April 18th, 2004, 09:16 AM
|
#17 (permalink)
| | Ultimate Member
Join Date: May 2003
Posts: 1,824
|
damn, misread something...
sorry, ignore this
Last edited by ShawnD1 : April 18th, 2004 at 09:18 AM.
|
| |
April 18th, 2004, 09:15 PM
|
#18 (permalink)
| | Member
Join Date: Oct 2001 Location: Adelaide, South Aust
Posts: 461
|
Well, I worked out how to record and run a Macro and it worked out just fine (once I worked out that you have to highlight the section you want to output first). Thanks Omalley'.
Looks kind of plain though. I suppose it's the formatting that adds all that weight. |
| |
January 10th, 2007, 02:46 PM
|
#19 (permalink)
| | Junior Member
Join Date: Jan 2007
Posts: 1
| 2Hey ALL -- you should learn some Unix/Linux tools.
Then you have plenty of ways to convert CSV to html table in less that 3 min. |
| |
January 10th, 2007, 02:54 PM
|
#20 (permalink)
| | 1010011010
Join Date: Oct 2001 Location: Chicagoland IL
Posts: 3,249
| Quote:
Originally Posted by a271828 2Hey ALL -- you should learn some Unix/Linux tools.
Then you have plenty of ways to convert CSV to html table in less that 3 min. | Welcome to TechIMO... BTW, did you realize you are replying to a thread that is almost 3 years old? Also, I'm sure Unix\Linux tools are wonderful, but why not just write a script that might take a few minutes and accomplish what you need to?  |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |