Export Excel Files to Azure Blob Storage from websites hosted on Azure App Service

Amit Khobragade 20 Reputation points
2023-03-23T10:57:21.8433333+00:00

Previously we were using IIS for deploying .NET web application.

One export to excel button had been given on UI to export details from database to Excel file and then it will be downloaded to local disc storage.

We used Microsoft Office Interop Excel to export file.

It was working fine locally. But when we deployed application on Azure App service, it was not downloading files in local disk.

Can we export excel file to Azure Blob Storage with the help of Microsoft Office Interop Excel??

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,438 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,922 questions
0 comments No comments
{count} votes

Accepted answer
  1. John Ibrahim 75 Reputation points
    2023-03-23T13:00:32.22+00:00

    Yes, it is possible to export an Excel file to Azure Blob Storage using Microsoft Office Interop Excel. However, it is not recommended to use Interop Excel in a server environment such as Azure App Service, as it can cause stability and security issues.

    Instead, it is recommended to use a library or tool specifically designed for server-side Excel generation and export, such as EPPlus or ClosedXML. These libraries can generate Excel files without relying on Interop Excel, and can also export the files directly to Azure Blob Storage.

    By exporting the Excel file to Azure Blob Storage, you can make it accessible to users through a URL, instead of requiring them to download the file to their local disk. This can also make it easier to manage and share the file with other users.


0 additional answers

Sort by: Most helpful