How to create Excel file using OpenXML without creating a local file?

后端 未结 2 1392
面向向阳花
面向向阳花 2020-12-03 05:07

Is it possible to create and edit an excel document using OpenXML SDK without creating a local file?

As per the documentation the Create method demands

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-03 05:59

    Adding another answer as I spent way too much time searching for this: Another way to save a SpreadsheetDocument to a stream is by calling SpreadsheetDocument.Clone(Stream s)

    It has the benefit of letting you save to a stream even if you created the document from a file or a stream you don't want to save to.

提交回复
热议问题