Hi Everyone,
Can you please!
What am I doing wrong?
ExcelBuf.OpenBook_NAS2(FileName); - GOOD
Error in the function ExcelBuf.OpenSheet_NAS2("Template Sheet Name");
OpenSheet_NAS2(SheetName : Text[30])
i := 1;
EndOfLoop := XlWrkBkRTC.Worksheets.Count;
ERROR
A call to System.__ComObject.get_Count failed with this message: The type of one or more arguments does not match the method's parameter type.
WHILE (i <= EndOfLoop) AND (NOT Found) DO BEGIN
XlWrkShtRTC := XlWrkBkRTC.Worksheets.Item(i);
ERROR
A call to System.__ComObject.get_Item failed with this message: The type of one or more arguments does not match the method's parameter type.
IF SheetName = XlWrkShtRTC.Name THEN
Found := TRUE;
i := i + 1;
END;
IF Found THEN
XlWrkShtRTC := XlWrkBkRTC.Worksheets.Item(SheetName)
ELSE
ErrorExcelProcessing(STRSUBSTNO(WorksheetNotFoundErr,SheetName));
Help me, please!!!
Can you please!
What am I doing wrong?
ExcelBuf.OpenBook_NAS2(FileName); - GOOD
Error in the function ExcelBuf.OpenSheet_NAS2("Template Sheet Name");
OpenSheet_NAS2(SheetName : Text[30])
i := 1;
EndOfLoop := XlWrkBkRTC.Worksheets.Count;
ERROR
A call to System.__ComObject.get_Count failed with this message: The type of one or more arguments does not match the method's parameter type.
WHILE (i <= EndOfLoop) AND (NOT Found) DO BEGIN
XlWrkShtRTC := XlWrkBkRTC.Worksheets.Item(i);
ERROR
A call to System.__ComObject.get_Item failed with this message: The type of one or more arguments does not match the method's parameter type.
IF SheetName = XlWrkShtRTC.Name THEN
Found := TRUE;
i := i + 1;
END;
IF Found THEN
XlWrkShtRTC := XlWrkBkRTC.Worksheets.Item(SheetName)
ELSE
ErrorExcelProcessing(STRSUBSTNO(WorksheetNotFoundErr,SheetName));
Help me, please!!!