문의자

Open XML SDK FAQ

일반 토론

In this post, we are listing quite some topics that have been discussed in the past. We also list the links to the best known solutions. We will continue add more topic to the list going forward.

FAQ

1.How many versions of Open XML Format SDK are there and which version is available in your solution?

§So far, there have been two versions of Open XML Format SDK: V1 (1.0) and V2 (2.0). V1 is a product version, which can be redistributed in your solution, while V2 is still in CTPs without a RTW version product license, so it cannot be redistributed.

14.How to automatically recalculate the formula value for cells in Spreadsheet?

A cell with a formula will store the cached value in the markup and show the cached value as the result. If the cell value referenced by the formula is changed programmatically, the cell with the formula has no idea of that change. The cached value of this formula is then obsolete, and should be updated. The automatic recalculation requires runtime layout functionality, which is not supported in the SDK. The workaround for this situation is to: delete the cached value of the formula cell, and then invoke Excel to recalculate the value for you at backend. The Excel service could help here.

15.How to add passwords to OOXML document via the SDK?

The SDK uses System.IO.Packaging API to unzip the OOXML package, which is fundamentally a .zip package. The current design of the SDK cannot either decode an encrypted OOXML package or add passwords to OOXML documents. You may leverage automation or server-side service to implement this requirement.

16.How to generate a valid document?

After you use the SDK to generate a document programmatically, sometimes you unluckily find that the document cannot be consumed by Office application, and Office application does not offer enough/informative indication to tell you what the problem is. In Open XML Format SDK 2.0 August 2009 CTP for Microsoft Office , there’s a new feature called Validation, which is designed to help the developers find out the errors, understand them and solve them. Here’s a tutorial talking about this feature.

#12 - are you serious? There is no pointer, link or information in any other form about how to generate a table of contents. The given link only gives a non-descriptive solution to two specific problems that occur
after you managed to create the TOC.