Rikard Bosnjakovic wrote: > I am going to add data row wise to Excel. Doing it manually, it would > be like this: > > <enter data> TAB <enter data> TAB <enter data> RETURN > <enter data> TAB <enter data> TAB <enter data> RETURN > > The TAB makes the cursor go to the next cell in the row, and the > RETURN makes the cursor go to the next row, in the same column as the > first cell. > > Now I need to do this in Python, but I cannot find any docs of how to > get the x,y-coords of the cursor, nor how to move the cursor one cell > at a time (i.e. in a relatively way). > I just noticed in your subject line you referred to COM-object. Sorry I overlooked that. When you work with an Office program such as Excel, you work with its DOM (Document Object Model).
So please show us how far you have come with the COM program. How well you understand the DOM? You need a handle on the range and selections objects. AFAIK there is no easy way to simulate keyboard behavior, and the DOM is far more powerful. Bob Gailer 510-978-4454 _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32