Page 1 of 1

ComatePlus [SOLVED]

Posted: Mon Jun 30, 2014 3:19 pm
by malo
hello to all

I can not move the sheet (9) before the sheet(2) in an Excel workbook with comateplus.
I tried several code with it but it moves the sheet in a new workbook.

Code: Select all

Exl\GetObjectProperty("worksheets(9)\move")
Exl\GetObjectProperty("worksheets(2)\before")
Thank you in advance for your answers

Re: ComatePlus [SOLVED]

Posted: Tue Jul 01, 2014 10:51 am
by malo
Looking about the forums I found the solution to my problèeme.
Thank you Falko for his work on these functions that have helped me and many people who also helped
sorry if there is some misunderstanding -> google translation

Code: Select all

FirstSheet.s="9"
SecondSheet.s="2"
 
    objSheet = Exl\GetObjectProperty("Worksheets("+Str(SecondSheet)+")")
    If objSheet
      Exl\Invoke("Worksheets("+FirstSheet+")\move(#Empty, " + Str(objSheet) + " as COMateObject)")
      objSheet\Release()
    EndIf