user673453
user673453

Reputation: 167

Export to Excel tool for asp.net

Is there any tool that can export a dynamically generated html to excel in c sharp?

Upvotes: 2

Views: 1580

Answers (3)

Nika G.
Nika G.

Reputation: 2384

why do u want to write functionality that already exists. mean excel has it, u can import any web page (just to note excel uses IE engine to render tags). here are steps how it can be achieved.

Open excel; go to Data Tab; click From Web;

New Web Query child window opens.

write into Address Bar and go to the web page u wan to import.

after page loads into the window click import button

that's all.

(i assumed u are using ms office 2007, if diff version, diff steps)

just one more note. ms office uses IE rendering engine, so not all tags are supported, so if it looks ugly, do not blame me ;)

Upvotes: 1

Tudor Carean
Tudor Carean

Reputation: 982

I'm not sure how you want to export html to Excel. In Excel we are talking about rows and columns while html is a document. You would probably want to export html to Word or pdf.

In any case, for creating Excel files in C# I've used the following 2 libraries: http://www.codeproject.com/KB/office/biffcsharp.aspx and http://code.google.com/p/excellibrary/

Upvotes: 0

Related Questions