Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import win32com.client as win32com
  2. from win32com.client import constants
  3.  
  4. xl = win32com.gencache.EnsureDispatch('Excel.Application')
  5. xl.Visible = True
  6. wb = xl.Workbooks.Add ()
  7. Sheet1 = wb.Sheets("Sheet1")
  8.  
  9. # Fill in some summy formulas
  10. for i in range(10):
  11. Sheet1.Cells(i+1,1).Value = "=10*"+str(i+1)
  12.  
  13. Sheet1.Range("A1:A16").Copy()
  14. Sheet1.Range("C1").Select()
  15. Sheet1.PasteSpecial(Paste=constants.xlPasteValues)
  16.  
  17. TypeError: Paste() got an unexpected keyword argument 'Paste'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement