Skip to main content

Utility for read/write of Excel or csv files

Project description

-- Prerequisite modules -pandas@0.25.3 -openpyxl3.0.1 -xlrd@1.2.0

-- Install xlsfile pip install xlsfile --user

-- How to use xlsfile?

from xlsfile import xlsfile

Csv file testing

print("Test csv file") contents = xlsfile.readcsv("test2.csv") xlsfile.writecsv("test3.csv", contents)

input = {} input["name"] = ["Test1", "Test2", "Test3"] input["email"] = ["", "", ""] input["name"].append("Test4") input["email"].append("")

filename = "testfamily.xlsx"

Excel file test

print("\nExcel file test") xlsfile.write(filename, input) contents = print(contents)

Excel to csv

print("\nExcel to csv") xlsfile.xls2csv(filename, filename.replace(".xlsx", ".csv"))

csv to Excel

print("\ncsv to Excel") xlsfile.csv2xls(filename.replace(".xlsx", ".csv"), "testfamily2.xlsx") contents ="testfamily2.xlsx") print(contents)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xlsfile-shaw1236-0.0.2.tar.gz (2.8 kB view hashes)

Uploaded source

Built Distribution

xlsfile_shaw1236-0.0.2-py3-none-any.whl (4.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page