hexagon logo

Excel comand in Quindos 2020.1

Hi everybody .
I Need help for use "Excel" comand in Quindos 2020.1.
Has Someone tried this comand ?
There Is an example for read or write value into a Cell? I dont understand how setting the command .

Thanks.
Cristian
  • Hello

    I have something for you on this subject.
    Variable for a shaft that was defined and read via Excel for measuring the shaft via the Y-axis


    Excel file







































    XCO YCO ZCO DIA LEN OFS OT UT FORM GD&T
    0,000 0,000 0,000 120,000 -110,000 5,000 0,080 0,050 0,020 Merkmal 1
    0,000 -120,000 0,000 140,000 -180,000 5,000 0,080 0,050 0,020 Merkmal 2



    !--------------------------------------------------------------
    ! Quindos 7 Excel input datei
    !--------------------------------------------------------------
    ~WorkBook = F:\Quindos7lib\Programme\5.231592.K\EXCEL DATEN\Variablen_Shaft.xlsx
    ~WorkSheet = Tabelle1
    ~Visible = Y
    !--------------------------------------------------------------
    ! open the Excel file
    !--------------------------------------------------------------
    Excel (ACT=Open, VIS=~Visible, WBK=~WorkBook, SAV=Y)
    Excel (ACT=Open, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet)
    !--------------------------------------------------------------
    S=1
    !Num=10
    !************************************************* ************************************************** *************
    !ELE 1 ----------------------------------------------------------------------------------------------------------
    DO (NAM=K, BGN=S, END=Num, DLT=1)
    If (BXP=REA:S==1)
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=A4, SAV=Y, OBJ=XCO(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=B4, SAV=Y, OBJ=YCO(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=C4, SAV=Y, OBJ=ZCO(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=D4, SAV=Y, OBJ=DIA(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=E4, SAV=Y, OBJ=LEN(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=F4, SAV=Y, OBJ=OFS(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=G4, SAV=Y, OBJ=OT(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=H4, SAV=Y, OBJ=UT(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=I4, SAV=Y, OBJ=FORM(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=J4, SAV=Y, OBJ=GDT(K))
    !ELE 2 ----------------------------------------------------------------------------------------------------------
    S=2
    !DO (NAM=K, BGN=K, END=K, DLT=1)
    ElseIf (BXP=REA:S==2)
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=A5, SAV=Y, OBJ=XCO(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=B5, SAV=Y, OBJ=YCO(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=C5, SAV=Y, OBJ=ZCO(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=D5, SAV=Y, OBJ=DIA(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=E5, SAV=Y, OBJ=LEN(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=F5, SAV=Y, OBJ=OFS(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=G5, SAV=Y, OBJ=OT(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=H5, SAV=Y, OBJ=UT(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=I5, SAV=Y, OBJ=FORM(K))
    Excel (ACT=Read, VIS=~Visible, WBK=~WorkBook, WSH=~WorkSheet, RNG=J5, SAV=Y, OBJ=GDT(K))
    !ELE 3 ----------------------------------------------------------------------------------------------------------
    EndIf
    ENDDO
    !STOP
    ! close file
    Excel (ACT=CloseAll, WBK=~WorkBook)
    !--------------------------------------------------------------
    !STOP Start der Messung
    DO (NAM=I, BGN=1, END=2, DLT=1)

    GENCYL (NAM=A(I), XCO=XCO(I), YCO=YCO(I), ZCO=ZCO(I), DIA=DIA(I), NPT=NPT(I), PLA=ZX, INO=O, MIP=MIP, MXP=MXP, PDI=PRBDIA, LEN=LEN(I), NPL=NPL(I), DEL=Y, OFS=OFS(I)+2)
    MECYL (NAM=A(I), ITY=CY2)
    GetDMEPos (XPO=X, YPO=Y, ZPO=Z)
    MOVCMM (TYP=ABS, DST=((DIA(I)/2)+(PRBDIA*2)+20,Y,Z))
    ENDDO


    Best regards
    Michael



  • Thanks so mutch Hribe85 .
    Your example Is perfect , you are very kind.