helpme18's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
34 (0.01 per day)
Joined:
21-October 09
Profile Views:
2,034
Last Active:
User is offline Aug 07 2014 06:37 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
Playstation
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   helpme18 has not set their status

Posts I've Made

  1. In Topic: Python-invalid mode (w+b) or filename

    Posted 7 Aug 2014

    View Postandrewsw, on 07 August 2014 - 11:27 AM, said:

    Yes, but the value of 'nextcolumn' doesn't change within this inner loop - and it shouldn't either as it is controlling the main (outer) loop.


    Oh wow thanks for the tip, it worked. I got the older code to work by catching the exception and proceeding anyway:
    try:
    	wb.save("instance"+str(nextcolumn)+'.xls')
    except Exception:
    	pass
    
    


    Which is just dumb. Thanks again.
  2. In Topic: Python-invalid mode (w+b) or filename

    Posted 7 Aug 2014

    View Postandrewsw, on 07 August 2014 - 10:47 AM, said:

    I cannot be certain that this is the main issue, but:
        for s in columnB:
    
            wb.save("instance"+str(nextcolumn)+'.xls')
    

    you are over-writing the same file (.xls) a number of times in a loop. You only need to save this file once, outside this loop.


    No, i'm trying to create several files, one for each loop. As the loop goes through the column it adds to the 'nextcolumn' variable. So the files in the directory for 3 columns in readme would be instance0.xlsx,instance1.xlsx,instance2.xlsx

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private
Website URL:
Website URL  http://

Friends

helpme18 hasn't added any friends yet.

Comments

helpme18 has no profile comments yet. Why not say hello?