Merge pull request #48 from ankitdas09/csvToExcel

added csv to excel converter
This commit is contained in:
Advaita Saha 2022-10-02 12:46:55 +05:30 committed by GitHub
commit de73fea33a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,9 @@
# CSV to EXCEL
This is a simple script that lets you convert CSV files to Excel.
## Usage
* 2 packages required pandas and openpyxl
* Use `pip install pandas` and `pip install openpyxl`
* Add path to your csv file and output excel file WITH EXTENSTION `.csv` and `.xlsx`
* Run `python script.py`

View File

@ -0,0 +1,10 @@
import pandas as pd
def makeExcel():
df = pd.read_csv('Path to your CSV file.csv')
# index and header can be set True or False accoring to needs
df.to_excel('Path where save as Excel file.xlsx', index=False, header=True)
print('Converted Successfuly')
if __name__ == "__main__":
makeExcel()