Hi NishimuraChinatsu,
Thanks for reaching out to Microsoft Q&A.
Use the below python code to convert your excel(xls, xlsm...etc) into CSV files. You can run the query in your synapse notebook, just change the path according to your requirement. I have tried this out in my synapse environment it works good.
import pandas as pd
excel_file = 'abfss://xxxxxx*anonymous user*.dfs.core.windows.net/Financial Sample_orig-3Sheets.xlsx'
all_sheets = pd.read_excel(excel_file, sheet_name=None)
sheets = all_sheets.keys()
for sheet_name in sheets:
sheet = pd.read_excel(excel_file, sheet_name=sheet_name)
sheet.to_csv("abfss://xxxxxxxx*anonymous user*xx.dfs.core.windows.net/%s.csv" % sheet_name, index=False)
Please Upvote and Accept as answer if the reply was helpful.