LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default wanting to save HTML format in one sheet

Hi all,

Recently I did a VBA code that works with MSXML and save the result in
one another *.xls file, something like this

<?xml version="1.0" encoding="ISO-8859-1"?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
<html
<table border="1"
width="70%"<tr<thdiscipline</th<thsuggests</th<thavailable</th<thnon
available</th</tr<tr<td<b1995-1999</b</td<td
align="center"2</td<td align="center"1</td<td align="center"1
</td</tr<tr<td<b2000-2005</b</td<td align="center"2</td<td
align="center"2</td<td align="center"0 </td</tr</table
</html

and now I wish that this same result it was showed right to my sheet1
and no more saving like other file.

See'm mycode


Dim app As New MSXML2.DOMDocument30

Dim xmlDom, xslDom, projDom, xslFileName As String

Dim xslt As New MSXML2.XSLTemplate30
Dim xslDoc As New MSXML2.FreeThreadedDOMDocument30
Dim xmlDoc As New MSXML2.DOMDocument30
Dim xslProc As IXSLProcessor
Dim xmlout As New MSXML2.FreeThreadedDOMDocument30
Dim oStream As New adodb.Stream
Dim oRecord As New adodb.Recordset
Set oStream = New adodb.Stream

oStream.Type = 1 'Binary


xslDoc.async = False
xslDoc.Load "c:\compara.xsl"



If (xslDoc.parseError.errorCode < 0) Then
Dim myErr
Set myErr = xslDoc.parseError
MsgBox ("Ha um erro " & myErr.reason)
Else
Set xslt.stylesheet = xslDoc
xmlDoc.async = False
xmlDoc.Load "C:\Instructional_program.xml"
If (xmlDoc.parseError.errorCode < 0) Then
Set myErr = xmlDoc.parseError
MsgBox ("You have error " & myErr.reason)
Else
oStream.Open

Set xslProc = xslt.createProcessor()
xslProc.input = xmlDoc
'xslProc.Transform
xslProc.output = oStream


xslProc.Transform

oStream.SaveToFile ("c:\Doc_out.xls")


oStream.Close


End If
End If

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save As HTML Format Issue DRHowells Excel Discussion (Misc queries) 0 June 17th 08 11:35 AM
Can I Save an Excel spread sheet as html text Joe Miller Excel Discussion (Misc queries) 2 January 7th 06 04:57 PM
Can I Save an Excel spread sheet as html text? Joe Miller Excel Discussion (Misc queries) 5 January 2nd 06 10:47 PM
Can I Save an Excel spread sheet as html text? Joe Miller Excel Discussion (Misc queries) 0 December 31st 05 07:21 PM
Save single sheet from XLS file as HTML Tomasz Klim Excel Discussion (Misc queries) 2 July 29th 05 03:55 PM


All times are GMT +1. The time now is 10:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"