1 Replies - 154 Views - Last Post: 20 August 2014 - 07:58 PM Rate Topic: -----

#1 jgrimmie  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 18-August 14

Anyone help with xlwt?

Posted 20 August 2014 - 07:49 PM

I am trying to use xlwt to write out input from a user to a excel spreed sheet but I don't understand how I increment the cell values for each item in a list.


import xlwt
from datetime import datetime


wb = xlwt.Workbook()
ws = wb.add_sheet("A Test Sheet") #creates a new work sheet in the work book. The string is the name 


#ws.write(0, 0, "something")
#ws.write(0, 10, "something")


list = ["blaw", "blaw1", "blaw2"]
for i in list:
	someInput = int(raw_input("Input some something here please"))
	right = 0
	down = 0
	ws.write(down, right, someInput)
	right = right + 1
	down = down + 1
	
	
	
	
	
wb.save("testworkbook.xls") #saves the work book. The string is the name







Is This A Good Question/Topic? 0
  • +

Replies To: Anyone help with xlwt?

#2 jgrimmie  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 18-August 14

Re: Anyone help with xlwt?

Posted 20 August 2014 - 07:58 PM

lol, I am so dumb I had the loop resetting the values back every time sorry for being a noob please delete this thread for the love of good and my future children.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1