Powershell azure function to read data from an API and output as excel in blob storage

Luuk van Vliet 26 Reputation points
2022-04-13T10:51:10.68+00:00

Hello,

I have a scenario where we need to read data from an API and create an excel file in Azure Blob Storage using Powershell Azure Functions.

Is this possible at all? And if so could you provide a small example?

Best,
Luuk

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,678 questions
0 comments No comments
{count} votes

Accepted answer
  1. Daniel Kåven 696 Reputation points
    2022-04-14T16:51:17.587+00:00

    Since I don't have an Azure Blob available atm I created this script for you too look at.
    There are two functions:

    • ApiToExcel, this uses the ImportExcel module and creates a local file of any API request you add to it. Please modify to match your API.
    • FileToBlob you can pipe a file or more in to this and it should connect and upload the files. (Untested)

    There are sources in the code and if this didn't help let me know and I'll look into it when I have my Azure Lab up.

    https://github.com/dkaaven/M365-Scripts/blob/main/azure/FileToBlob.ps1


    If this was helpful, please Upvote and Accept Answer.
    Else, please Comment with further information or related questions.

    0 comments No comments

0 additional answers

Sort by: Most helpful