home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Applications and Operating Systems
Ask a Tech Support Question (free)!

Export excel --> html - How to clean html?

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2136
Discussions: 200,948, Posts: 2,379,401, Members: 246,309
Old April 10th, 2004, 01:25 AM     #11 (permalink)
Member
 
BITM@D's Avatar
 
Join Date: Oct 2001
Location: Adelaide, South Aust
Posts: 461
Send a message via Yahoo to 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?
__________________
Bill S.
Editor
BuickStreet.com
V8PC.com/web <-- logo comp
BITM@D is offline   Reply With Quote
Old April 10th, 2004, 08:42 AM     #12 (permalink)
1010011010
 
jmichna's Avatar
 
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
jmichna is offline   Reply With Quote
Old April 10th, 2004, 10:52 PM     #13 (permalink)
Member
 
BITM@D's Avatar
 
Join Date: Oct 2001
Location: Adelaide, South Aust
Posts: 461
Send a message via Yahoo to BITM@D
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.
BITM@D is offline   Reply With Quote
Old April 11th, 2004, 12:04 AM     #14 (permalink)
Did you try Google yet?
 
Siliconjunkie's Avatar
 
Join Date: Feb 2003
Location: Buckhannon, WV
Posts: 3,468
Send a message via AIM to Siliconjunkie
__________________
My computer is bigger than yours!
Siliconjunkie is offline   Reply With Quote
Old April 12th, 2004, 10:18 AM     #15 (permalink)
Senior Member
 
omalleytrading's Avatar
 
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
omalleytrading is offline   Reply With Quote
Old April 12th, 2004, 09:58 PM     #16 (permalink)
Member
 
BITM@D's Avatar
 
Join Date: Oct 2001
Location: Adelaide, South Aust
Posts: 461
Send a message via Yahoo to BITM@D
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.
BITM@D is offline   Reply With Quote
Old April 18th, 2004, 09:16 AM     #17 (permalink)
Ultimate Member
 
ShawnD1's Avatar
 
Join Date: May 2003
Posts: 1,824
Send a message via AIM to ShawnD1 Send a message via MSN to ShawnD1
damn, misread something...

sorry, ignore this

Last edited by ShawnD1 : April 18th, 2004 at 09:18 AM.
ShawnD1 is offline   Reply With Quote
Old April 18th, 2004, 09:15 PM     #18 (permalink)
Member
 
BITM@D's Avatar
 
Join Date: Oct 2001
Location: Adelaide, South Aust
Posts: 461
Send a message via Yahoo to BITM@D
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.
BITM@D is offline   Reply With Quote
Old 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.
a271828 is offline   Reply With Quote
Old January 10th, 2007, 02:54 PM     #20 (permalink)
1010011010
 
jmichna's Avatar
 
Join Date: Oct 2001
Location: Chicagoland IL
Posts: 3,249
Talking

Quote:
Originally Posted by a271828 View Post
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?
jmichna is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Making Health Care Worse (173)
Is It Just Me? (2936)
The disrespect of Obama by Russian .. (22)
Wireless Televisions. (12)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Regular Build (6)
Is the PSU I received dead? (12)
radeon x850xt platinum & shader.. (5)
Print spooler problem (15)
HIS HD5770 graphic card question (15)
windows vista security holes (9)
Install XP pro and a Vista laptop ?.. (11)
Dept. of HS: NSA 'Helped' Develop V.. (15)
Recent Discussions
How to convert MP3's (4)
Wireless Televisions. (12)
Graphics Card Upgrade Question (3)
Laptop with wireless problem. (2)
Internet Lost (1)
Hp Artist Edition + Matching Bag (0)
My monitor won't turn on after instal.. (0)
Asus P4G8X Mobo (6)
radeon x850xt platinum & shader 3 (5)
Xbox 360 GTA: SA disk error (1)
Is the PSU I received dead? (12)
windows 7 internet problem (5)
Multiple Restarts Required at Boot (0)
BSOD On Startup (ntoskrnl.exe) (2)
Print spooler problem (15)
Have you switched yet? (86)
screen resolution vs monitor size (2)
sms storage to PC (0)
Regular Build (6)
Open With ..... Win7 (0)
java code for fibonacci (1)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (35)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Partition Magic caused HDD problem (3)


All times are GMT -4. The time now is 09:13 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28