I need python code to read in multiple Excel data in a blob using AzureFunction and output multiple sheets ('outlet','product','delivery') of each Excel to a csv file for conversion. When outputting, I want each csv file to be named with the A1 value of the Excel data and saved in a separate blob folder. (Each corresponding sheet in Excel has the same format)(The contents of the excel data are numbers and letters).
I apologize for my lack of learning, but I don't know the Python code to do this in AzureFunction. Please let me know.
The image of the python code is as follows.
import pandas as pd
import openpyxl
from azure.storage.blob import BlobClient,BlobServiceClient,ContentSettings
connectionstring="XXXXXXXXXXXXXXXX"
#blob
container = "workspace/folder_excel"
save_container = "workspace/folder_csv"
excel_files="*.xlsm"
sheet_name = ['outlet','product','delivery']
#read_excelfile_list
for excel_file in excel_files:
#ExcelBook
input_book = pd.ExcelFile( container + excel_file, engine="openpyxl")
#excel_sheet
#added A1cell number
for sheet_name in sheets:
sheet = pd.read_excel(excel_file, sheet_name=sheet_name)
sheet.to_csv(save_container `+ %.csv" % sheet_name, index=False)