Strange discrepancy between Excel VBA and Python
gustav at morpheus.demon.co.uk
Wed Mar 12 23:19:07 CET 2003
"Moore, Paul" <Paul.Moore at atosorigin.com> writes:
> When I try to resize a range in Python, I get a different answer from VBA.
> Simple example, get a block of 10 cells at the top left of sheet 1 (I know
> I can do this other ways, but it illustrates the point)
> From the Excel VBA immediate window:
> ? Sheets(1).Cells(1,1).Resize(10,10).Address
> From PythonWin:
>>>> xl = Dispatch("Excel.Application")
> <win32com.gen_py.Microsoft Excel 9.0 Object Library._Application instance at 0x72000536>
> (You note that I have run Makepy).
> Why is Python showing this as a single cell???
I discovered that there is a GetResize method which does work. But I'm
not sure what Resize() is meant for, in that case. Can anyone explain?
This signature intentionally left blank
More information about the Python-list