Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 710 Bytes

README.md

File metadata and controls

35 lines (26 loc) · 710 Bytes

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.