Convert from Excel to HTML?
Discussion
can't vouch for any of tehm , but google found these
http://www.google.co.nz/search?q=convert+excel+to+...
http://www.google.co.nz/search?q=convert+excel+to+...
lestag said:
can't vouch for any of tehm , but google found these
http://www.google.co.nz/search?q=convert+excel+to+...
Thanks, I've had a look through most of them but they all seem to shareware or restricted in some way.http://www.google.co.nz/search?q=convert+excel+to+...
JontyR said:
Jinx said:
Save file as "single web page" mhtml in the save as option?
I think this is the idea of not doing it manually because of having many files to work with!Have you any experience with VBA?
If you create a folder called Test in the C drive, throw a few of the spreadsheets into it.
You will need to open up a Excel window and go into the code area, copy the code run it.
Let me know what you get.
If you create a folder called Test in the C drive, throw a few of the spreadsheets into it.
You will need to open up a Excel window and go into the code area, copy the code run it.
Let me know what you get.
Option Explicit
Private Const cmsPath As String = "C:\Test\"
Private Const cmbSubFolders As Boolean = True
Private Sub SaveFiles()
Dim oFsys As Object
Dim oFile As Object
Dim oParentFol As Object, oFol As Object
Dim oWb As Workbook, oWs As Worksheet
Dim sNew As String
Set oFso = CreateObject("Scripting.FileSystemObject")
Set oParentFol = oFsys.GetFolder(cmsPath)
For Each oFile In oParentFol.Files
If LCase(Right(oFile.Name, 3)) = "xls" Then
Set oWb = Workbooks.Open(Filename:=oFile.Path)
sNew = oFile.Path
sNew = Left(sNew, Len(sNew) - 3) & "htm"
For Each oWs In oWb.Worksheets
oWb.PublishObjects.Add(SourceType:=xlSourceSheet, Filename:=sNew, Sheet:=oWs.Name, HtmlType:=xlHtmlStatic, DivID:=Left(oFile.ShortName, Len(oFile.ShortName) - 4) & "_" & oWs.Name).Publish
Next oWs
oWb.Close SaveChanges:=False
Set oWb = Nothing
End If
Next oFile
End Sub
You could try this vbscript it has no error checking but should work..
Dim fso, f, Files, FileColl
Const xlHTML = 44
Set objExcel = CreateObject("Excel.Application")
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("d:\testdir")
Set FileColl = f.Files
For Each Files in FileColl
Set objWorkBook = objExcel.Workbooks.Open(Files.parentfolder & "\" & Files.name )
objWorkBook.SaveAs Files.parentfolder & "\" & Replace(Files.name,"xls","html") , xlHtml
objWorkBook.Close True
Next
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff