convert Table to HtmlTable and Word.Table

  • Thread starter Thread starter Michael Meckelein
  • Start date Start date
M

Michael Meckelein

Hi all!

I have a table like
Table myTable = new Table();

Now, I want to publish the table as part of a webpage and as part of a word
document. I tried to convert the table, but the compiler say
"Cannot convert type 'System.Web.UI.WebControls.Table' to
'System.Web.UI.HtmlControls.HtmlTable'"
if I use (HtmlTable)myTable.

I have also tried to convert HtmlTable to Word.Table without look.

I need either convert:
- Table to HtmlTable and Word.Table
or
- HtmlTable to Word.Table

Is there a way to do that?

Thanks in advance.
Michael
 
You would need a component(s) to achieve this. Simple casts I bleieve wont work. If you want to you could create a html table by iterating through the rows and calls collections and manually bulding an HTML string.
 
Rasika said:
You would need a component(s) to achieve this. Simple casts I
bleieve wont work. If you want to you could create a html table by
iterating through the rows and calls collections and manually bulding
an HTML string.

Rasika,

thanks for assistance. But unfortunately bad news for me. I will
follow your suggestion and go through the rows and calls collection to
build my HtmlTable and Word.Table. If someone has further suggestion,
don't hesitate to post! It would be nice if there are a quicker
solution to accomplish that.

Michael
 

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

Back
Top