How can I control individual page orientation when converting Excel documents to XOD?

Q: we have noticed all excel sheets are shown in portrait layout, and we would like to have as default a portrait layout. Ho can we do that?


The conversion should preserve the page orientation of the input document. If this is not the case, please provide steps to reproduce the behaviour (we would need a sample document and information about the version of Word you’re using as well as the Windows version and architecture you’re running on).

The Conversion API does not provide options to change orientation. But there are ways to programmatically change the orientation of a page.

It might be easiest to programmatically change your Excel documents to your desired orientation. For this you would need to use Office development tools (,

Another option would be to rotate the page of the XOD file after conversion, which can be done through an XPS editing API (such as .

A third option would be to use the PDFNet SDK, which provides the capability to rotate PDF pages. So if you were to first convert your office document to PDF, then to XOD, you could rotate the PDF page prior to converting it to XOD. You can detect a page’s current orientation with Page.GetPageWidth() and Page.GetPageHeight():

If Page.GetPageWidth() > Page.GetPageHeight(), the page is currently in landscape mode. Otherwise, it’s currently in portrait mode.

You can rotate a PDF page with Page.SetRotation():