NetOfficeFw / NetOffice

🌌 Create add-ins and automation code for Microsoft Office applications.
MIT License
697 stars 143 forks source link

Excel Worksheet.Copy does not work properly #255

Closed MarcoBorn closed 4 years ago

MarcoBorn commented 5 years ago

I get the following error message:

Failed to proceed Method on Excel.Worksheet=>Copy.
   bei NetOffice.Invoker.Method(ICOMObject comObject, String name, Object[] paramsArray)
   bei NetOffice.CoreMethodExtensions.ExecuteMethod(Core value, ICOMObject caller, String name, Object argument)

when I try to us the following command:

With ObjAppXL
  .Workbooks(StrQuellDatei).Sheets("Hinweise").Copy(before:= 
  .Workbooks(StrZielDatei).Sheets(1))
End With

The variables ObjAppXL, StrQuellDatei and StrQuellDatei were set before and accessing them also made no errors.

jozefizso commented 4 years ago

Please, provide more information about your issue.

The Worksheet.Copy works in latest NetOffice library when used as in you example.

jozefizso commented 4 years ago

Closing as there is no more information from issue opener.