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"] = ["test1@gmail.com", "test2@yahoo.com", "test3@gmail.com"] input["name"].append("Test4") input["email"].append("test@yahoo.com")

filename = "testfamily.xlsx"

Excel file test

print("\nExcel file test") xlsfile.write(filename, input) contents = xlsfile.read(filename) 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 = xlsfile.read("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.

Files for xlsfile-shaw1236, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size xlsfile_shaw1236-0.0.2-py3-none-any.whl (4.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size xlsfile-shaw1236-0.0.2.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page