Click here to Skip to main content
Rate this: bad
good
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.
 
Thanks.
Posted 1-May-13 6:40am

1 solution

Rate this: bad
good
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?)
 
—SA
  Permalink  
Comments
surajsurve at 2-May-13 3:09am
   
This (Microsoft office) is not recommended by Microsoft to install it on server.
Here is the link :
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
Sergey Alexandrovich Kryukov at 2-May-13 9:19am
   
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
—SA
surajsurve at 6-May-13 11:21am
   
Thanks a lot.
Sergey Alexandrovich Kryukov at 6-May-13 11:43am
   
You are very welcome.
Good luck, call again.
—SA

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



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 1 May 2013
Copyright © CodeProject, 1999-2014
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