#154555 - 2006-01-04 02:51 PM
Excel Scripting
|
Arend_
MM club member
Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
|
Hi, I searched all trough the forum and google'd it but I can't seem to find the code that let's you save an excel sheet as HTML.
Could anyone help me out on this one ? I mean I'm only looking for the simple command to save as html, for instance:
Code:
Dim $ExcelSheet $ExcelSheet = CreateObject("Excel.Sheet") $ExcelSheet.Application.Visible = 0 $ExcelSheet.Application.Cells(1, 1).Value = "This is column A, row 1" $ExcelSheet.SaveAs("D:\TEST.XLS")
But it would be something like: Code:
$ExcelSheet.SaveAsHTML("D:\TEST.HTML")
|
Top
|
|
|
|
#154556 - 2006-01-04 03:20 PM
Re: Excel Scripting
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4549
Loc: USA
|
You must be close... I found this document on the Scripting Guy site, and it references Saving as a CSV. It appears its just a number that need to follow the path. I've dug around but have yet to find any reference to those constants.
|
Top
|
|
|
|
#154559 - 2006-01-04 04:46 PM
Re: Excel Scripting
|
Arend_
MM club member
Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
|
Indeed, I've read trough that dump and found nothing regarding HTML. Basically the option has nothing to do with excel itself. I belief it calls for a function that rewrites the excel layout into html layout and therefor cannot be used in vbs/kix. I was hoping someone would prove me wrong I'm still looking tho, if I find anything I will let you know.
|
Top
|
|
|
|
#154560 - 2006-01-04 04:48 PM
Re: Excel Scripting
|
Arend_
MM club member
Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
|
Yeah I know it should be quitted, I was merely showing a quick example to express the meaning of the SaveAs command.
|
Top
|
|
|
|
#154564 - 2006-01-04 05:22 PM
Re: Excel Scripting
|
Arend_
MM club member
Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
|
Perfect
To give a quick & nasty example that works: Code:
Dim $ExcelSheet $ExcelSheet = CreateObject("Excel.Sheet") $ExcelSheet.Application.Visible = 0 $ExcelSheet.Application.Cells(1, 1).Value = "This is column A, row 1" $ExcelSheet.SaveAs("D:\TEST.html", 44)
Thx alot for your help Shawn and everyone who contributed I love this forum, every time I needed something there is always someone around that actually helps Thx again
|
Top
|
|
|
|
#154574 - 2006-01-04 07:17 PM
Re: Excel Scripting
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4549
Loc: USA
|
$#!^ ...
Quote:
(check under XlFileFormat)
got me on the edit...;)
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
1 registered
(Allen)
and 496 anonymous users online.
|
|
|