<jupyter_start><jupyter_text>pip install openpyxl<jupyter_code>#pip install openpyxl<jupyter_output><empty_output><jupyter_text>codings<jupyter_code># @author <NAME>


import os

import csv

import sys

from openpyxl import Workbook

from importlib import reload


if sys.version[0] == '2':
    reload(sys)

if __name__ == '__main__':
    workbook = Workbook()
    worksheet = workbook.active
    with open('/home/100158/Downloads/csv-to-xlsx/input.csv', 'r') as f: # your input location path

        reader = csv.reader(f)
        for r, row in enumerate(reader):
            for c, col in enumerate(row):
                for idx, val in enumerate(col.split(',')):
                    cell = worksheet.cell(row=r+1, column=c+1)
                    cell.value = val
    workbook.save('/home/100158/Downloads/csv-to-xlsx/output.xlsx') # your ouput location path<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12008978675645342, 'fraction_numerical': 0.017957351290684626, 'mean_word_length': 3.1682242990654204, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '178818', 'license': 'MIT', 'n_tokens_mistral': 327, 'n_tokens_neox': 304, 'n_words': 68, 'path': 'csv-to-xlsx.ipynb', 'repo_name': 'Suriya-manoharan/csv-to-xlsx-converter-in-python', 'size': '901'}