How can I use python in azure function to convert files?

NishimuraChinatsu-9854 756 Reputation points
2022-09-05T06:52:18.427+00:00

I would like to know the code and how to do it for AzureFunction to convert a macro valid excel file (.xlsm) in gen2 to a csv file using python in azure function.

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

Accepted answer
  1. kilian goëtz 146 Reputation points
    2022-09-05T16:53:20.817+00:00

    Hi,

    This is the code from this link https://www.codegrepper.com/code-examples/python/move+excel+xlsm+to+csv+file+python

       python  
         
       import pandas as pd  
       data_xls = pd.read_excel('excelfile.xlsx', 'Sheet2', dtype=str, index_col=None)  
       data_xls.to_csv('csvfile.csv', encoding='utf-8', index=False)  
    

    And how to create an Azure Function https://www.serverlessnotes.com/docs/create-an-azure-function-with-python

    Kind regards, Kilian GOËTZ.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.