Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 solution

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
 
Share this answer
 
Comments
surajsurve 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 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 6-May-13 11:21am    
Thanks a lot.
Sergey Alexandrovich Kryukov 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900