How to load HTML data into a worksheet tab using OWC?

M

mjohnson

Is it possible to load an HTML page into a separate worksheet tab and
have it renendered as HTML?

I have to create a multi-tabbed "spec file" for our department. My
thought was that I could create a set of webservices that returned the
appropriate worksheet content using the LoadText() function from the
Worksheet (not the Spreadsheet). This works, however, the raw HTML is
displayed instead of getting formated. Is it possible to get OWC to
render the HTML?

I can get the formatting to work if I use:

Response.ContentType = "application/vnd.ms-excel"

but then I lose the ability to create a tabbed spreadsheet. Am I
trying to ask too much from the OWC?

Here's what I'm doing:

function CreateDrawing( aSheet )
{
aSheet.Range("A1").LoadText("http://fiberweb/projects/racklayout.asp?ProjID="+ProjID);
}

I got back the correct data in the tab but I just can't get it to
format.

thanks for your help!
 
A

Alvin Bruney - ASP.NET MVP

unfortunately, putting anything in the spreadsheet simply results in text
formatted output. So what you are trying to do is not possible - if i've
understood you correctly.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 
M

mjohnson

So what would be your advice if all I want to do is to programmatically
create worksheet, add an image, and display a bunch of rows from SQL
Server? It looks like I have to abandon the web services idea. Would
this be possible as a standalone app using C#?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top