Did you use the excel macro recorder and look at the results to help you
write that program? It seems to bear all the hallmarks of code generated
that way. The macro recorder can be great, but almost always it is
possible to speed up code by altering it afterwards, to condense and
speed up the
I think you just need do:
sh.Range(sh.Cells(4,1),sh.Cells(6,3)).Value =
sh.Range(sh.Cells(1,1),sh.Cells(3,3)).Value
--
http://mail.python.org/mailman/listinfo/python-list
I found the solution for this. It needs to select a new location and
paste from "sh". Thank you for your reading this.
import win32com.client
xl=win32com.client.Dispatch("Excel.Application")
xl.Visible=1
wb = xl.Workbooks.Add( )
sh=wb.Worksheets(1)
sh.Cells(1,1).Value = "Hello World!"
sh.Cells(3,
Hi there,
I need your help for python <--> excel. I want to paste selected
cells (range) to different location on the same sheet in Excel through
python. I have tried it for a while but could not figure it out. Here
is my sample code:
import win32com.client
xl=win32com.client.Dispatch("Excel.A