BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TIWLayoutMgrHTML and Excel workbook saved as HTML

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (IntraWeb)
View previous topic :: View next topic  
Author Message
Freddy Junior
Guest





PostPosted: Sun Mar 25, 2007 7:39 pm    Post subject: TIWLayoutMgrHTML and Excel workbook saved as HTML Reply with quote



Hi,

I need to show in a region a specific HTML file; this special file is
created saving a MS Excel worksheet as HTML.
To do it, I add a TIWLayoutMgrHTML to the form and set is as LayoutMgr
for the region to show; at runtime, I do
IWLayoutMgrHTML1.HTML.LoadFromFile('c:\temp\excel_file.htm').
Unfortunately the output is not the same of opening the htm file
directly with web browser.
Why ?

As a simple testcase, do the following:
- create a new Excel file
- populate the first three cells with random values
- format the first in bold, the second with red color and the third with
yellow background
- save the file as HTML (c:\temp\test_html_excel.htm)
- create a new IntraWeb project and drop a TIWLayoutMgrHTML
- create a region and set it aligned as alBottom; then set its LayoutMgr
with IWLayoutMgrHTML1
- in IWAppForm1 OnCreate event, simply do:
IWLayoutMgrHTML1.HTML.LoadFromFile('c:\temp\test_html_excel.htm')

Running the application the region will show the three values but with
no format (bold, red, yellow).
Is it my mistake ?

TIA.
Back to top
Jason Southwell
Guest





PostPosted: Mon Mar 26, 2007 9:05 pm    Post subject: Re: TIWLayoutMgrHTML and Excel workbook saved as HTML Reply with quote



Quote:
I need to show in a region a specific HTML file; this special file is
created saving a MS Excel worksheet as HTML.
To do it, I add a TIWLayoutMgrHTML to the form and set is as LayoutMgr

Wow... that's doing things the hard way.

You can store the html file in your files folder and use the
TIWURLWindow component and point to it via a url. Alternatively, you
can use the TIWText component and put the html directly in the Lines
property with RawText set to True.
Back to top
Freddy Junior
Guest





PostPosted: Tue Mar 27, 2007 7:59 pm    Post subject: Re: TIWLayoutMgrHTML and Excel workbook saved as HTML Reply with quote



Quote:
TIWURLWindow component and point to it via a url. Alternatively, you
can use the TIWText component and put the html directly in the Lines
property with RawText set to True.


The TIWText works only for "simple" file...
I need to show "complex" worksheet with charts.

Anyway, thanks for the suggestion !
Back to top
Jason Southwell
Guest





PostPosted: Tue Mar 27, 2007 8:02 pm    Post subject: Re: TIWLayoutMgrHTML and Excel workbook saved as HTML Reply with quote

Quote:
The TIWText works only for "simple" file...
I need to show "complex" worksheet with charts.

Anyway, thanks for the suggestion !

Then TIWURLWindow is the way to go.
Back to top
Freddy Junior
Guest





PostPosted: Tue Mar 27, 2007 8:19 pm    Post subject: Re: TIWLayoutMgrHTML and Excel workbook saved as HTML Reply with quote

Quote:
Then TIWURLWindow is the way to go.

But my Intraweb application is stand alone, so I don't know how to
compose the URL...
Can I use the format "file:///C:/Temp/xxx.htm" ?
Back to top
Jason Southwell
Guest





PostPosted: Fri Mar 30, 2007 1:06 am    Post subject: Re: TIWLayoutMgrHTML and Excel workbook saved as HTML Reply with quote

Freddy Junior wrote:
Quote:
Then TIWURLWindow is the way to go.

But my Intraweb application is stand alone, so I don't know how to
compose the URL...
Can I use the format "file:///C:/Temp/xxx.htm" ?

Place the file in the ExeDir/Files subdirectory. Then refer to it via:

/files/xxx.htm
Back to top
Freddy Junior
Guest





PostPosted: Fri Mar 30, 2007 1:44 pm    Post subject: Re: TIWLayoutMgrHTML and Excel workbook saved as HTML Reply with quote

Quote:
Place the file in the ExeDir/Files subdirectory. Then refer to it via:
/files/xxx.htm

Ok, I've tried this way.
It does function if the file is "simple"; but it raises "404 File not
found" if the file refers to a subdir.
For example xxx.htm contains objects (xml, gif, css, htm, etc.) stored
in xxx_file subdir.
Back to top
Jason Southwell
Guest





PostPosted: Fri Mar 30, 2007 7:58 pm    Post subject: Re: TIWLayoutMgrHTML and Excel workbook saved as HTML Reply with quote

Quote:
It does function if the file is "simple"; but it raises "404 File not
found" if the file refers to a subdir.
For example xxx.htm contains objects (xml, gif, css, htm, etc.) stored
in xxx_file subdir.

Make sure that your document uses relative pathing and that the links
are in URL format and not File format.

Also, make sure you have AllowSubdirectories set to true in the
servercontroller.
Back to top
Freddy Junior
Guest





PostPosted: Fri Mar 30, 2007 9:05 pm    Post subject: Re: TIWLayoutMgrHTML and Excel workbook saved as HTML Reply with quote

Quote:
Also, make sure you have AllowSubdirectories set to true in the
servercontroller.

Wow !
I've set AllowSubFolders tu true on the IWServerController form and it
now works as a charm !

Thank you Jason very much.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (IntraWeb) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.