Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Creating HTML files in VBA

I'm trying to create a script that saves a sheet in Excel
as an HTML file using VB. In Excel, the "A" column is
frozen because it contains names, the other columns ("B"
though "AI") contain the data that corrisponds to the name
in the "A" column. Since there more columns that contain
data then will fit on the screen, I need to keep the "A"
column frozen in the HTML file (so when you scroll the
side of the HTML file the stuff that was in "A" colum
stays still, similar to the way it works in Excel when you
freeze a column). I also want to keep the web page
static, so people can't edit anything.

Is there way to do this? This is what I have right now.

ActiveWorkbook.PublishObjects.Add _
SourceType:=xlSourceRange, _
Filename:="C:\bm\www\Win2k-1CPU\data.htm", _
Sheet:="Data", _
Source:="A1:AI510", _
HtmlType:=xlHtmlStatic, _
Title:="RawData"

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Creating HTML files in VBA

Hi Keith,
Are you trying to generate simple HTML code, .
Excel to HTML conversions
http://www.mvps.org/dmcritchie/excel/xl2html.htm

or are you trying to interface with MS Office's verbose HTML
generator so that it looks exactly like Excel and does not adapt to
the window size In which case see the MS links on the above
page. I guess it is the second once since your example has
HtmlType:=xlHtmlStatic, _
which would be MS constant. I don't see that in the following
and maybe you are already familiiar with the articles such as:

http://support.microsoft.com/default...;en-us;q168561

--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Keith Zander" wrote in message ...
I'm trying to create a script that saves a sheet in Excel
as an HTML file using VB. In Excel, the "A" column is
frozen because it contains names, the other columns ("B"
though "AI") contain the data that corrisponds to the name
in the "A" column. Since there more columns that contain
data then will fit on the screen, I need to keep the "A"
column frozen in the HTML file (so when you scroll the
side of the HTML file the stuff that was in "A" colum
stays still, similar to the way it works in Excel when you
freeze a column). I also want to keep the web page
static, so people can't edit anything.

Is there way to do this? This is what I have right now.

ActiveWorkbook.PublishObjects.Add _
SourceType:=xlSourceRange, _
Filename:="C:\bm\www\Win2k-1CPU\data.htm", _
Sheet:="Data", _
Source:="A1:AI510", _
HtmlType:=xlHtmlStatic, _
Title:="RawData"

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Creating HTML files in VBA

Hi David,

I'm trying to create a VB script that can save a sheet in
workbook as a web page. I'd like the page to look exactly
like it would look in excel (frozen frames, column width
etc), but also be static (non-editable).

It's also important that the web page not be dependent on
the user having excel installed. I've tried setting the
HtmlType to xHtmlCalc, and that gives me the frozen frames
I need, but it makes the web page dependent on having
excel installed. Plus it puts a lot of excel editing
stuff at the top of the page that I don't want to be
there. The way the web page looks with HtmlType set to
xHtmlStatic is ideally what I want, I just need the frozen
frames to be available.

I tried htmlconvert function in the link at the bottom,
but I don't think the htmlconvert function is available in
Office XP (unless I'm doing something wrong). When trying
to use the HTMLconvert, it says the sub or function not
found. I tried opening HTML.xla up to see which functions
were available, but it is password protected.

Thanks
Keith

-----Original Message-----
Hi Keith,
Are you trying to generate simple HTML code, .
Excel to HTML conversions
http://www.mvps.org/dmcritchie/excel/xl2html.htm

or are you trying to interface with MS Office's verbose

HTML
generator so that it looks exactly like Excel and does

not adapt to
the window size In which case see the MS links on the

above
page. I guess it is the second once since your example

has
HtmlType:=xlHtmlStatic, _
which would be MS constant. I don't see that in the

following
and maybe you are already familiiar with the articles

such as:

http://support.microsoft.com/default.aspx?scid=kb;en-

us;q168561

--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed

Nov. 2001]
My Excel Pages:

http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:

http://www.mvps.org/dmcritchie/excel/search.htm

"Keith Zander" wrote in message

...
I'm trying to create a script that saves a sheet in

Excel
as an HTML file using VB. In Excel, the "A" column is
frozen because it contains names, the other columns ("B"
though "AI") contain the data that corrisponds to the

name
in the "A" column. Since there more columns that

contain
data then will fit on the screen, I need to keep the "A"
column frozen in the HTML file (so when you scroll the
side of the HTML file the stuff that was in "A" colum
stays still, similar to the way it works in Excel when

you
freeze a column). I also want to keep the web page
static, so people can't edit anything.

Is there way to do this? This is what I have right now.

ActiveWorkbook.PublishObjects.Add _
SourceType:=xlSourceRange, _
Filename:="C:\bm\www\Win2k-1CPU\data.htm", _
Sheet:="Data", _
Source:="A1:AI510", _
HtmlType:=xlHtmlStatic, _
Title:="RawData"

Thanks



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Creating HTML files in VBA

Hi Keith,
I avoid generating HTML code from Excel because I generally dislike the
very things you want. I'm not really familiar with the options you reference,
but you do want the equivalent of not checking interactive, and then

Go back to my page
Excel to HTML conversions
http://www.mvps.org/dmcritchie/excel/xl2html.htm

look in the related material for the remove office components.

The Office 2000 HTML Filter 2.0 (Download Center) will remove all
Office 2000 extra formatting tags from an HTML file.
http://office.microsoft.com/download.../Msohtmf2.aspx (valid on 2002-11-08)

and believe it or not that link is still valid.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Keith Zander" wrote in message ...
Hi David,

I'm trying to create a VB script that can save a sheet in
workbook as a web page. I'd like the page to look exactly
like it would look in excel (frozen frames, column width
etc), but also be static (non-editable).

It's also important that the web page not be dependent on
the user having excel installed. I've tried setting the
HtmlType to xHtmlCalc, and that gives me the frozen frames
I need, but it makes the web page dependent on having
excel installed. Plus it puts a lot of excel editing
stuff at the top of the page that I don't want to be
there. The way the web page looks with HtmlType set to
xHtmlStatic is ideally what I want, I just need the frozen
frames to be available.

I tried htmlconvert function in the link at the bottom,
but I don't think the htmlconvert function is available in
Office XP (unless I'm doing something wrong). When trying
to use the HTMLconvert, it says the sub or function not
found. I tried opening HTML.xla up to see which functions
were available, but it is password protected.

Thanks
Keith

-----Original Message-----
Hi Keith,
Are you trying to generate simple HTML code, .
Excel to HTML conversions
http://www.mvps.org/dmcritchie/excel/xl2html.htm

or are you trying to interface with MS Office's verbose

HTML
generator so that it looks exactly like Excel and does

not adapt to
the window size In which case see the MS links on the

above
page. I guess it is the second once since your example

has
HtmlType:=xlHtmlStatic, _
which would be MS constant. I don't see that in the

following
and maybe you are already familiiar with the articles

such as:

http://support.microsoft.com/default.aspx?scid=kb;en-

us;q168561

--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed

Nov. 2001]
My Excel Pages:

http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:

http://www.mvps.org/dmcritchie/excel/search.htm

"Keith Zander" wrote in message

...
I'm trying to create a script that saves a sheet in

Excel
as an HTML file using VB. In Excel, the "A" column is
frozen because it contains names, the other columns ("B"
though "AI") contain the data that corrisponds to the

name
in the "A" column. Since there more columns that

contain
data then will fit on the screen, I need to keep the "A"
column frozen in the HTML file (so when you scroll the
side of the HTML file the stuff that was in "A" colum
stays still, similar to the way it works in Excel when

you
freeze a column). I also want to keep the web page
static, so people can't edit anything.

Is there way to do this? This is what I have right now.

ActiveWorkbook.PublishObjects.Add _
SourceType:=xlSourceRange, _
Filename:="C:\bm\www\Win2k-1CPU\data.htm", _
Sheet:="Data", _
Source:="A1:AI510", _
HtmlType:=xlHtmlStatic, _
Title:="RawData"

Thanks



.



Reply
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
Creating multiple html tables for products urlocaljeweler Excel Discussion (Misc queries) 2 December 11th 09 08:28 PM
Creating multiple html tables for products urlocaljeweler New Users to Excel 0 December 9th 09 07:50 PM
Importing HTML files Mary Ann Excel Discussion (Misc queries) 0 March 4th 06 09:51 AM
Creating hyperlinks in Excel HTML converted page. [email protected] Setting up and Configuration of Excel 1 August 11th 05 02:12 AM
Problems Creating html files with excel sheet Bigredno8 Excel Discussion (Misc queries) 1 July 5th 05 11:28 PM


All times are GMT +1. The time now is 06:24 PM.

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

About Us

"It's about Microsoft Excel"