Vijay Tayde
Vijay Tayde

Reputation: 67

how to use microsoft office interop with Azure app service

How to use Microsoft office inter-op with Azure app service Microsoft office inter-op is working or not in azure app service . if yes then let me know .

Upvotes: 5

Views: 4596

Answers (2)

tomRedox
tomRedox

Reputation: 30463

As per @Tom Sun's answer there is no Office interop in Azure. OpenXML does allow creation of documents, and libraries like ClosedXML can help to make OpenXML easier to work with if you have previously used VBA for example.

However, an OpenXML based approach does have limitations - a big one is around elements that require a knowledge of the page size to work correctly (such as page numbering and table of contents). Many of these elements are managed in extension fields added to OpenXML document by Word/Excel and won't work as you'd expect unless you then open the item in Word or Excel. The trap here is that if you want to print say a Word document straight to a PDF for download within an Azure App, then the page numbering and table of contents won't work as the file will never have passed through a copy of Word to have those fields updated. There is no easy way round this and it's definitely something to be aware of.

Upvotes: 2

Tom Sun
Tom Sun

Reputation: 24559

How to use Microsoft office inter-op with Azure app service Microsoft office inter-op is working or not in azure app service.

In short, we can't use it on the Azure WebApp service. There is no MS Office inter-op present on Azure WebApp service and Azure WebApp is sandbox. If we want to write and read excel file on the Azure WebApp, we could use the DocumentFormat.OpenXml as workaround.

You could get demo code from this document.

Upvotes: 4

Related Questions