I am trying to write a script which will automate a copy/paste of employee time sheets
from several files to one compiled file. Since they are time sheets with project codes some cells are left blank where an employee worked on a different project that day. Also the files have been converted from xlsx(2007) to .csv.xls which xlrd seems to open just fine.
I do know how to open and create a book object but my knowledge of this module is very limited so I thought maybe a general algorithm would be helpful:
import xlrd, xlwt
put all following in for or while loop to iterate through files:
book = xlrd.open_workbook('mybook.csv.xls')
extract data; store data for ouput
use for loop to iterate over data, output to final sheet
open next file, repeat process storing each output below the previous
I am looking for anything that will help me find the answers, not just code.
Any help would be appreciated. Thanks.
This might help … it reproduces your data as closely as possible (dates remain as dates, empty cells don’t become text cells with 0-length contents, booleans and error cells don’t become number cells).