Read XLS with Excel Loop in Excel Loop (Nested Loops)

Hi all

I’m trying to read data in two different Excel sheets. The programm has to loop over data in the first Excel-Sheet and for each item loop over another Excel-Sheet.
Is that possible? I could imagine that it doesn’t work because of the function XLS.IER that is the identical for the two loops. I tried with the variable J for the second loop but it is not solving the problem.

Here is my code below. I obtain Error Nr. 12110.

Thank for your help.
Nathan

+PROG TENDON urs:16
KOPF Hüllrohrgeometrie definieren


!*!Label 1. Systemwerte für das Spannverfahren
LET#XLS.SHEET    "NachVerb_HuellroMaster_lsn"

LOOP#I

$ Variablen

LET#Bez0            XLS.READ(2+#I,1)
LET#HuellroID       XLS.READ(2+#I,2)
LET#SpVerfahrenID   XLS.READ(2+#I,4)
#define Bez=#Bez0


IF #XLS.IER<3

SGEO NRG #HuellroID NRH V11 NRSV #SpVerfahrenID ELEM axes BEZ $(Bez)

LET#XLS.SHEET    "110"

    LOOP#I
    LET#Station  XLS.READ(2+#I,5)
    LET#Y        XLS.READ(2+#I,6)
    LET#Z        XLS.READ(2+#I,7)

    IF #XLS.IER<3
    ZPUV TYP REFX S #Station   U  #Y     V  #Z     ! DVS -    DL -     DR -  RV -
    ENDIF
    ENDLOOP #XLS.IER<3

ENDIF
ENDLOOP #XLS.IER<3

ENDE