1

I am attempting to use the range of a list, specifically col_test and then I would like to use that range to specify the cells to be filled on the new worksheet.

I want the list col_test to fill the second column in the new sheet starting at row 6.

Here I am trying to use the "write" function to do this but I do not know the correct parameters to use.

import os
import glob
import pandas as pd

for csvfile in glob.glob(os.path.join('.', '*.csv')):
    df = pd.read_csv(csvfile)

col_test = df['Test #'].tolist()
col_retest = df['Retest #'].tolist()

from xlrd import open_workbook
from xlutils.copy import copy

rb = open_workbook("Excel FDT Master_01_update.xlsx")
wb = copy(rb)

s = wb.get_sheet(3)
s.write(range_of_col_test, col_test)
wb.save('didthiswork.xls')
geojasm
  • 121
  • 9
  • It is not clear what you are trying to do but you do not have to leave pandas. Everything can be done in pandas – Mo. Atairu Dec 06 '17 at 23:36
  • What I want to do is to take the col_test list and write it to a column in the sheet that I am bringing up, but it needs to write starting in row 6 of the column 2 of that sheet. – geojasm Dec 06 '17 at 23:44

0 Answers0