Lance Hoffmeyer wrote:
> I ran makepy.py and loaded Microsoft Excel Object Library 11.0
> I have imported:
>
> import win32com.client
> from win32com.client import constants
> import re
> import codecs,win32com.client
> import time
> import datetime
> import win32com.client.dynamic
>
>
> using t
I ran makepy.py and loaded Microsoft Excel Object Library 11.0
I have imported:
import win32com.client
from win32com.client import constants
import re
import codecs,win32com.client
import time
import datetime
import win32com.client.dynamic
using this expression
lastcol = sh.UsedRange.Find("*",
>
> I get the error that xlPrevious is not defined.
>
If you are using pythonwin, run the COM Makepy utility on Microsoft
Excel Object Library. Then you have access to the defined constants as
follows.
>>> import win32com.client
>>> win32com.client.constants.xlPrevious
2
Hope this helps.
Paul
Hi all,
I am trying to find the last used column in an excel sheet using win32com:
lastcol = sh.UsedRange.Columns.Count
works, but only if there is no formatting. I want to allow formatting in the
columns.
I would rather use the code below because formatted cells are irrelevant.
using:
last