convert all excel files in folder to csv python

Solutions on MaxInterview for convert all excel files in folder to csv python by the best coders in the world

showing results for - "convert all excel files in folder to csv python"
Martina
29 Jun 2018
1import pandas as pd
2import os
3import glob
4
5
6source="D:\\source\\"
7dest='D:\\dest\\'
8os.chdir(source)
9
10for file in glob.glob("*.xls"):
11       df = pd.read_excel(file)
12       df.to_csv(dest+file+'.csv', index=False)
13       os.remove(file)
14for file in glob.glob("*.xlsx"):
15       df = pd.read_excel(file)
16       df.to_csv(dest+file+'.csv', index=False)
17       os.remove(file)
queries leading to this page
convert excel files in directory to csv pythonconvert excel file to csv files pandas pythonhow to convert excel files in csv files pandasconvert all excel files in folder to csv pythonconvert vcs files to xls pythonpython xls to csvpython from excel to csvhow to convert all files in a folder csv to excelexcel to csv pythpython excel to csv file mass conversionpandas excel to csv excel python to csvconvert multiple excel files to csv pythonxlsx file to spreedsheet convert pythonexcel marksheet csv files with pythonconvert excel to csv in pythonpython convert excel to csvhow to convert excel file in csv files pandashow to convert all files in a folder csv to excel using pythonxlsd files python to one sheet and convert to pcsvpython excel to csvconvert xls to csv in pythonconvert excel file to txt pythonexcel to csv pythonexcel to csv converter pythonpandas xls to csvread convert xlxs file to csv pythonconvert drive excel files to csv file in pythonimport excel python to csvconvert all excel files to csvuse with open 28 29 method to convert excel to csvhow to read excel file saved as csv in pythonconverting excel to csv in pythonneed to convert drive excel files to csv pythonlibrary to convert xlxs to csv in pythonconvert excel to csv pandasuse with open 28 29 method python to convert excel to csvconvert excel to csv pythonhow to convert excel to csv in jupyter notebookconvert xls to csv pythonxlsx file python to one sheet and convert to csv uisng xlsdconvert excel to csv python pandasxls to csv pythonconvert xls file to csv using pythonuse with open python to convert excel to csvconvert excel file with multiple sheets into csv pythonconvert excel files to csv files pandas pythonxlsx file to sheet convert pythonhow to convert excel to csv in pythonconvert excel files to csv files pandaspython open xlsx and convert til csvconvert excel file to csv pandasconvert drive excel to csv file in pythonexcel to csvread excel file and convert it into csvconvert excel to csv in pandasconvert excel to csv using pythonconvert xlsx to csv python usgin pandasconvert excel to csv python csvconvert file xlsx to csv pandasconvert all excel files in folder to csv python