1

I'm using xlrd & xlwt to transfer data from one spreadsheet to another, in this case an address. In the initial spreadsheet the address is a string, and I need it as a list in separate cells in the new spreadsheet. I'm trying to iterate through the list, and assign a new variable to each line, like this:

for s in workbook_in.sheets():
    store = s.name
    worksheet = workbook_in.sheet_by_name(store)
    store_name = worksheet.cell(0,1)
    print store_name.value
    store_address_cell = s.cell(1,1)
    store_address = re.split("[,.]",store_address_cell.value)
    for address_line in store_address:
        i = 1
        address + i = address_line
        i += 1

I'm not sure if it's even possible to define a variable in this way?

bordeltabernacle
  • 1,603
  • 5
  • 24
  • 46

0 Answers0