Click here to Skip to main content
13,143,185 members (56,580 online)
Rate this:
Please Sign up or sign in to vote.
I want to create and download excel file from datatable.Following methods I have used to do this.

1] Directly stream through HTTP response. Sent HTML code directy in HTTP response with some HTML tags with datatable loop through in.

Problem - When we (Save as) excel file while saving it changes its (save as type) as a web page because of the HTML content I am sending.

2] I haved also use Microsoft Interop dll. My work was almost done...!!

Problem - I have read that it requires office to install on server and this is not recommended by Microsoft.

3] I dont want to purchase anything for this task. So as per my study I have found another option that is open xml. I have done this task on my local machine using openxml dll and for that I have installed Open XML Sdk 2.0 (3.8 MB) setup. I want to publish this task on server now. So obviously I need to install Open XML Sdk 2.0 on server too.

Is it safe to install this sdk on server? or Is it risky like microsoft office?

If I am doing anything wrong then please suggest what to do.

Posted 1-May-13 5:40am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There is absolutely nothing wrong with installing this SDK anywhere. This is nothing but a library and presents no threats at all. In many ways, it's also much better then Office Interop. Interop operations depends on availability of Office installation, which is the subject of serious license limitations; also, such installation is heavy-weight, in contrast to Open XML SDK.

(I don't know what was discouraged by Microsoft. Could you provide a link?)

surajsurve 2-May-13 3:09am
This (Microsoft office) is not recommended by Microsoft to install it on server.
Here is the link :;EN-US;q257757#kb2
Thank you.
Those are reasonable considerations from Microsoft. I basically mentioned that using Open XML SDK is better, so this article is yet another justification
surajsurve 6-May-13 11:21am
Thanks a lot.
You are very welcome.
Good luck, call again.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170915.1 | Last Updated 1 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100