Skip to content

PowerShell Azure Function for creating and returning a generated Excel file on the server side

License

Notifications You must be signed in to change notification settings

dfinke/powershell-azure-function-return-excel-file

Repository files navigation

Powershell Azure Function Return Excel File

Deploy to Azure

Download the Excel File

Click here to try the live example, may take a bit, due to a cold start.

Expected Excel Results

image

After You Deploy to Azure

Once you deploy to Azure, you want to grab the Url for the PowerShell Azure Function you created, it looks like this https://powershell-azure-function-return-excel-file546f.azurewebsites.net/api/powershell-azure-function-return-excel-file. Follow these few steps to grab it.

Click on the links/buttons pointed to by the red arrows to get the Function Url.

Step 01

image

Step 02

image

Step 03

image

Step 04

image

Step 05

image

Now that you have the Url, you can paste it into a browser to download the workbook.

Click here to get the one I generated, may take a bit, due to a cold start.

Or use the PowerShell Invoke-RestMethod to download the generated Excel file.

$uri = 'https://powershell-azure-function-return-excel-file546f.azurewebsites.net/api/powershell-azure-function-return-excel-file'
Invoke-RestMethod -Uri $uri -OutFile .\SalesReport.xlsx
.\SalesReport.xlsx

About

PowerShell Azure Function for creating and returning a generated Excel file on the server side

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published