Skip to content

Read and write to excel by using dictionaries like {key:list}

License

Notifications You must be signed in to change notification settings

ClimenteA/bebexl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bebexl

read(xls, xlsx) - write(xls) in the shape of a dictionary like pandas df.to_dict("list")

Use case:

from bebexl import read_excel, write_excel

Get from xls and xlsx file a dictionary

table_dict = read_excel(path_to_workbook, sheetName=None, sheetIndex=0, showInfo=False)

#table_dict looks like: {Col1: [cell1, cell1 ..], Col2:[cell1, cell2...etc]}


#Do the work you need to do, but make sure you keep the same row length for each list in the dict.

Write the dictionary which looks like pandas df.to_dict('list') to a xls file.
write_excel(table_dict, excelName, sheetName="Sheet1")

Uses xlrd, xlwt modules to do that.

About

Read and write to excel by using dictionaries like {key:list}

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published