Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions excel_to_csv/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Excel to CSV

Run the script excel_to_csv.py the script will ask for the location of the Excel file and will store it inside the folder of the script.
14 changes: 14 additions & 0 deletions excel_to_csv/excel_to_csv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import openpyxl
import csv

print("Enter Path of your Excel file")
xls_file = input()
csv_file = 'mycsvfile.csv'
mode = 'w'

wb = openpyxl.load_workbook(xls_file)
sh = wb.active
with open(csv_file, mode, newline="") as f:
col = csv.writer(f)
for row in sh.rows:
col.writerow([cell.value for cell in row])
3 changes: 3 additions & 0 deletions excel_to_csv/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
certifi==2021.5.30
et-xmlfile==1.1.0
openpyxl==3.0.9