开发者

openXML SDK create Excel file

开发者 https://www.devze.com 2023-03-21 18:26 出处:网络
I am creating Excel files using OpenXML SDK 2.0. Is it required to install OpenXML SDK开发者_开发技巧 in the server?

I am creating Excel files using OpenXML SDK 2.0.

  1. Is it required to install OpenXML SDK开发者_开发技巧 in the server?

  2. If possible, can someone send me a sample code to create Excel file without using a template?

  3. Is it necessary to save the excel file created using OpenXML? I am creating the file but would not like to save it. Also, would be creating pivot tables in the excel file.

Thanks,


  1. You will need to include the dll in order to use the sdk, which should get built out when you deploy.

  2. I would recommend using a template since it will already contain a bunch of the XML that will make the Excel file valid and complete that you will not have to worry about adding. If you are totally against using one, then explore this blog for examples.

  3. You will need to save the changes so that when you return the file it will contain your changes.


3) You can use a memory stream, SpreadsheetDocument has Create and Open functions based on stream, too (not only file path or package).

0

精彩评论

暂无评论...
验证码 换一张
取 消