Can I Run IronXL with .NET on Azure?

This article was translated from English: Does it need improvement?
Translated
View the article in English

Yes, IronXL can be used on Azure to generate QR & Barcodes in C# & VB .NET Applications, and also read Barcodes & QR Codes from scanned images.

IronXL has been thoroughly tested on multiple Azure platforms including MVC websites, Azure Functions, and many more.


Step 1

1. Install IronXL to Get Started

First install with NuGet: https://www.nuget.org/packages/IronXL.Excel

Install-Package IronXL.Excel

How to Tutorial

2. Performance and Azure Tiers

We recommend that Azure B1 hosting levels are very suitable for our end users' Library needs. If they are creating a high throughput system, this may need to be upgraded.

3. Framework Choice

We have found that IronXL for Core and for Framework both work on Azure. .NET Standard applications seem to have a small performance advantage on speed and stability, but use more memory in process.

Azure free tier hosting is slow

Azure free and shared tiers, and the consumption plan, are not suitable for QR processing. We recommend Azure B1 hosting/Premium plan, which is what we use ourselves.

4. Docker on Azure

One way to gain the ability to control performance on Azure is to use IronXL applications and Functions from within Docker Containers.

We have a comprehensive IronXL Azure Docker tutorial for Linux and Windows instances and it is recommended reading.

5. Official Azure Function Support

IronXL supports Azure Function (Azure Functions V3). It hasn't been tested with V4 till now, but it is in our queue.

Working Azure Function Code Example

Tested on Azure Functions v3.3.1.0+. Here is a sample code:

using System.Net;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using IronXL;
using System.Net.Http.Headers;

// This is an Azure Function that processes an HTTP request and returns an Excel file
[FunctionName("excel")]
public static HttpResponseMessage Run(
    [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
    ILogger log)
{
    // Log the processing of the request
    log.LogInformation("C# HTTP trigger function processed a request.");

    // Set the IronXL license key
    IronXL.License.LicenseKey = "Key";

    // Load an existing workbook
    var workBook = WorkBook.Load("test-wb.xlsx");

    // Create a response with the workbook content as an attachment
    var result = new HttpResponseMessage(HttpStatusCode.OK);
    result.Content = new ByteArrayContent(workBook.ToByteArray());
    result.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
    { 
        FileName = $"{DateTime.Now:yyyyMMddmm}.xlsx" 
    };
    result.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");

    // Return the response
    return result;
}
using System.Net;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using IronXL;
using System.Net.Http.Headers;

// This is an Azure Function that processes an HTTP request and returns an Excel file
[FunctionName("excel")]
public static HttpResponseMessage Run(
    [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
    ILogger log)
{
    // Log the processing of the request
    log.LogInformation("C# HTTP trigger function processed a request.");

    // Set the IronXL license key
    IronXL.License.LicenseKey = "Key";

    // Load an existing workbook
    var workBook = WorkBook.Load("test-wb.xlsx");

    // Create a response with the workbook content as an attachment
    var result = new HttpResponseMessage(HttpStatusCode.OK);
    result.Content = new ByteArrayContent(workBook.ToByteArray());
    result.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
    { 
        FileName = $"{DateTime.Now:yyyyMMddmm}.xlsx" 
    };
    result.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");

    // Return the response
    return result;
}
Imports System.Net
Imports Microsoft.Azure.WebJobs
Imports Microsoft.Azure.WebJobs.Extensions.Http
Imports Microsoft.AspNetCore.Http
Imports Microsoft.Extensions.Logging
Imports IronXL
Imports System.Net.Http.Headers

' This is an Azure Function that processes an HTTP request and returns an Excel file
<FunctionName("excel")>
Public Shared Function Run(<HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route := Nothing)> ByVal req As HttpRequest, ByVal log As ILogger) As HttpResponseMessage
	' Log the processing of the request
	log.LogInformation("C# HTTP trigger function processed a request.")

	' Set the IronXL license key
	IronXL.License.LicenseKey = "Key"

	' Load an existing workbook
	Dim workBook = WorkBook.Load("test-wb.xlsx")

	' Create a response with the workbook content as an attachment
	Dim result = New HttpResponseMessage(HttpStatusCode.OK)
	result.Content = New ByteArrayContent(workBook.ToByteArray())
	result.Content.Headers.ContentDisposition = New ContentDispositionHeaderValue("attachment") With {.FileName = $"{DateTime.Now:yyyyMMddmm}.xlsx"}
	result.Content.Headers.ContentType = New MediaTypeHeaderValue("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")

	' Return the response
	Return result
End Function
$vbLabelText   $csharpLabel

Preguntas Frecuentes

¿Cómo puedo ejecutar aplicaciones .NET en Azure?

Puedes usar IronXL para ejecutar aplicaciones .NET en Azure. Permite generar códigos QR y de barras en aplicaciones C# y VB .NET y leerlos desde imágenes escaneadas. Ha sido probado en varias plataformas de Azure, incluyendo sitios web MVC y Azure Functions.

¿Cuáles son los niveles de alojamiento de Azure recomendados para un rendimiento óptimo?

Para un rendimiento óptimo con IronXL, recomendamos niveles de alojamiento Azure B1. Si estás diseñando un sistema de alto rendimiento, considera actualizar a un nivel superior.

¿Cuál es el mejor framework .NET para Azure?

IronXL funciona en .NET Core y .NET Framework en Azure. Sin embargo, las aplicaciones .NET Standard ofrecen una ligera ventaja de rendimiento en velocidad y estabilidad, aunque con mayor uso de memoria.

¿Es suficiente el nivel gratuito de Azure para procesar códigos QR?

Los niveles gratuitos y compartidos de Azure, junto con el plan de consumo, no son recomendables para el procesamiento de QR con IronXL. En su lugar, sugerimos usar el alojamiento Azure B1 o un plan Premium para un mejor rendimiento.

¿Se puede usar Docker para gestionar aplicaciones IronXL en Azure?

Sí, puedes usar Docker para gestionar aplicaciones y funciones de IronXL en Azure. Esta configuración permite un mejor control sobre el rendimiento. Un tutorial detallado de Azure Docker está disponible para instancias de Linux y Windows.

¿IronXL soporta Azure Functions?

Sí, IronXL soporta Azure Functions V3. Las pruebas para Azure Functions V4 están en marcha, con planes de ampliar el soporte en el futuro.

¿Cómo instalo IronXL para usar en Azure?

Puedes instalar IronXL a través de NuGet usando el comando: nuget install IronXL.Excel.

¿Hay un ejemplo de uso de IronXL con Azure Functions?

Sí, el artículo proporciona un código de ejemplo de Azure Function que procesa una solicitud HTTP y devuelve un archivo de Excel. Este ejemplo está probado en Azure Functions v3.3.1.0+.

Curtis Chau
Escritor Técnico

Curtis Chau tiene una licenciatura en Ciencias de la Computación (Carleton University) y se especializa en el desarrollo front-end con experiencia en Node.js, TypeScript, JavaScript y React. Apasionado por crear interfaces de usuario intuitivas y estéticamente agradables, disfruta trabajando con frameworks modernos y creando manuales bien ...

Leer más
¿Listo para empezar?
Nuget Descargas 1,686,155 | Versión: 2025.11 recién lanzado