
! Excel_Interfaces

! This module contains some of the Automation interfaces of the objects 
! defined in C:\Program Files\Microsoft Office\Office\EXCEL9.OLB
! Generated by the Fortran Module Wizard on 01/08/02 (modExcel9A)
!
! These are also found in modExcel16 generated today by the Module
! Wizard, only difference that all procedure names start with I such as:
!  Worksheets_Add  =  IWorksheets_Add

module modExcel_Interfaces

 		USE DFWINTY, null0 => null
		USE DFAUTO
		IMPLICIT NONE
	

		! CLSIDs		
		TYPE (GUID), PARAMETER :: CLSID_Global = &
			GUID(#00020812, #0000, #0000, &
			  CHAR('C0'X)//CHAR('00'X)//CHAR('00'X)//CHAR('00'X)// &
			  CHAR('00'X)//CHAR('00'X)//CHAR('00'X)//CHAR('46'X))
		TYPE (GUID), PARAMETER :: CLSID_OLEObject = &
			GUID(#00020818, #0000, #0000, &
			  CHAR('C0'X)//CHAR('00'X)//CHAR('00'X)//CHAR('00'X)// &
			  CHAR('00'X)//CHAR('00'X)//CHAR('00'X)//CHAR('46'X))
		TYPE (GUID), PARAMETER :: CLSID_Workbook = &
			GUID(#00020819, #0000, #0000, &
			  CHAR('C0'X)//CHAR('00'X)//CHAR('00'X)//CHAR('00'X)// &
			  CHAR('00'X)//CHAR('00'X)//CHAR('00'X)//CHAR('46'X))
		TYPE (GUID), PARAMETER :: CLSID_Worksheet = &
			GUID(#00020820, #0000, #0000, &
			  CHAR('C0'X)//CHAR('00'X)//CHAR('00'X)//CHAR('00'X)// &
			  CHAR('00'X)//CHAR('00'X)//CHAR('00'X)//CHAR('46'X))
		TYPE (GUID), PARAMETER :: CLSID_Chart = &
			GUID(#00020821, #0000, #0000, &
			  CHAR('C0'X)//CHAR('00'X)//CHAR('00'X)//CHAR('00'X)// &
			  CHAR('00'X)//CHAR('00'X)//CHAR('00'X)//CHAR('46'X))
		TYPE (GUID), PARAMETER :: CLSID_Application = &
			GUID(#00024500, #0000, #0000, &
			  CHAR('C0'X)//CHAR('00'X)//CHAR('00'X)//CHAR('00'X)// &
			  CHAR('00'X)//CHAR('00'X)//CHAR('00'X)//CHAR('46'X))
		TYPE (GUID), PARAMETER :: CLSID_QueryTable = &
			GUID(#59191DA1, #EA47, #11CE, &
			  CHAR('A5'X)//CHAR('1F'X)//CHAR('00'X)//CHAR('AA'X)// &
			  CHAR('00'X)//CHAR('61'X)//CHAR('50'X)//CHAR('7F'X))


		! Module Procedures
		CONTAINS
 			!$Application_GetWorkbooks return type is POINTER(p, INTEGER(INT_PTR_KIND()))
			INTEGER(INT_PTR_KIND()) FUNCTION $Application_GetWorkbooks($OBJECT, $STATUS)
				!DEC$ ATTRIBUTES DLLEXPORT	:: $Application_GetWorkbooks
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				INTEGER*4, INTENT(OUT), OPTIONAL	:: $STATUS	 ! Method status
				!DEC$ ATTRIBUTES REFERENCE			:: $STATUS
				INTEGER(INT_PTR_KIND()), VOLATILE :: $RETURN
				INTEGER*4 $$STATUS
				INTEGER(INT_PTR_KIND()) invokeargs
				invokeargs = AUTOALLOCATEINVOKEARGS()
				CALL AUTOADDARG(invokeargs, 'Workbooks', $RETURN, AUTO_ARG_OUT, VT_DISPATCH)
				$$STATUS = AUTOGETPROPERTYBYID($OBJECT, 572, invokeargs)
				IF (PRESENT($STATUS)) $STATUS = $$STATUS
				$Application_GetWorkbooks = $RETURN
				CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
			END FUNCTION $Application_GetWorkbooks

  			!$Application_GetWorksheets return type is POINTER(p, INTEGER(INT_PTR_KIND()))
			INTEGER(INT_PTR_KIND()) FUNCTION $Application_GetWorksheets($OBJECT, $STATUS)
				!DEC$ ATTRIBUTES DLLEXPORT	:: $Application_GetWorksheets
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				INTEGER*4, INTENT(OUT), OPTIONAL	:: $STATUS	 ! Method status
				!DEC$ ATTRIBUTES REFERENCE			:: $STATUS
				INTEGER(INT_PTR_KIND()), VOLATILE :: $RETURN
				INTEGER*4 $$STATUS
				INTEGER(INT_PTR_KIND()) invokeargs
				invokeargs = AUTOALLOCATEINVOKEARGS()
				CALL AUTOADDARG(invokeargs, 'Worksheets', $RETURN, AUTO_ARG_OUT, VT_DISPATCH)
				$$STATUS = AUTOGETPROPERTYBYID($OBJECT, 494, invokeargs)
				IF (PRESENT($STATUS)) $STATUS = $$STATUS
				$Application_GetWorksheets = $RETURN
				CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
			END FUNCTION $Application_GetWorksheets

  			SUBROUTINE $Application_SetScreenUpdating($OBJECT, $ARG1, $STATUS)
				!DEC$ ATTRIBUTES DLLEXPORT	:: $Application_SetScreenUpdating
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				LOGICAL*2, INTENT(IN)	:: $ARG1	
				!DEC$ ATTRIBUTES REFERENCE	:: $ARG1
				INTEGER*4, INTENT(OUT), OPTIONAL	:: $STATUS	 ! Method status
				!DEC$ ATTRIBUTES REFERENCE			:: $STATUS
				INTEGER*4 $$STATUS
				INTEGER(INT_PTR_KIND()) invokeargs
				invokeargs = AUTOALLOCATEINVOKEARGS()
				CALL AUTOADDARG(invokeargs, 'ScreenUpdating', $ARG1)
				$$STATUS = AUTOSETPROPERTYBYID($OBJECT, 382, invokeargs)
				IF (PRESENT($STATUS)) $STATUS = $$STATUS
				CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
			END SUBROUTINE $Application_SetScreenUpdating

 			SUBROUTINE $Application_SetVisible($OBJECT, $ARG1, $STATUS)
				!DEC$ ATTRIBUTES DLLEXPORT	:: $Application_SetVisible
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				LOGICAL*2, INTENT(IN)	:: $ARG1	
				!DEC$ ATTRIBUTES REFERENCE	:: $ARG1
				INTEGER*4, INTENT(OUT), OPTIONAL	:: $STATUS	 ! Method status
				!DEC$ ATTRIBUTES REFERENCE			:: $STATUS
				INTEGER*4 $$STATUS
				INTEGER(INT_PTR_KIND()) invokeargs
				invokeargs = AUTOALLOCATEINVOKEARGS()
				CALL AUTOADDARG(invokeargs, 'Visible', $ARG1)
				$$STATUS = AUTOSETPROPERTYBYID($OBJECT, 558, invokeargs)
				IF (PRESENT($STATUS)) $STATUS = $$STATUS
				CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
			END SUBROUTINE $Application_SetVisible

 			SUBROUTINE $Workbook_Close($OBJECT, SaveChanges, Filename, RouteWorkbook, $STATUS)
				!DEC$ ATTRIBUTES DLLEXPORT	:: $Workbook_Close
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: SaveChanges	
				!DEC$ ATTRIBUTES REFERENCE	:: SaveChanges
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Filename	
				!DEC$ ATTRIBUTES REFERENCE	:: Filename
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: RouteWorkbook	
				!DEC$ ATTRIBUTES REFERENCE	:: RouteWorkbook
				INTEGER*4, INTENT(OUT), OPTIONAL	:: $STATUS	 ! Method status
				!DEC$ ATTRIBUTES REFERENCE			:: $STATUS
				INTEGER*4 $$STATUS
				INTEGER(INT_PTR_KIND()) invokeargs
				invokeargs = AUTOALLOCATEINVOKEARGS()
				IF (PRESENT(SaveChanges)) CALL AUTOADDARG(invokeargs, '$ARG1', SaveChanges, AUTO_ARG_IN)
				IF (PRESENT(Filename)) CALL AUTOADDARG(invokeargs, '$ARG2', Filename, AUTO_ARG_IN)
				IF (PRESENT(RouteWorkbook)) CALL AUTOADDARG(invokeargs, '$ARG3', RouteWorkbook, AUTO_ARG_IN)
				$$STATUS = AUTOINVOKE($OBJECT, 277, invokeargs)
				IF (PRESENT($STATUS)) $STATUS = $$STATUS
				CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
			END SUBROUTINE $Workbook_Close
 
  			SUBROUTINE $Workbook_SaveAs($OBJECT, Filename, FileFormat, Password, WriteResPassword, ReadOnlyRecommended, CreateBackup, AccessMode, ConflictResolution, AddToMru, TextCodepage, TextVisualLayout, $STATUS)
				!DEC$ ATTRIBUTES DLLEXPORT	:: $Workbook_SaveAs
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Filename	
				!DEC$ ATTRIBUTES REFERENCE	:: Filename
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: FileFormat	
				!DEC$ ATTRIBUTES REFERENCE	:: FileFormat
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Password	
				!DEC$ ATTRIBUTES REFERENCE	:: Password
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: WriteResPassword	
				!DEC$ ATTRIBUTES REFERENCE	:: WriteResPassword
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: ReadOnlyRecommended	
				!DEC$ ATTRIBUTES REFERENCE	:: ReadOnlyRecommended
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: CreateBackup	
				!DEC$ ATTRIBUTES REFERENCE	:: CreateBackup
				INTEGER(INT_PTR_KIND()), INTENT(IN), OPTIONAL	:: AccessMode	! Void
				!DEC$ ATTRIBUTES REFERENCE	:: AccessMode
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: ConflictResolution	
				!DEC$ ATTRIBUTES REFERENCE	:: ConflictResolution
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: AddToMru	
				!DEC$ ATTRIBUTES REFERENCE	:: AddToMru
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: TextCodepage	
				!DEC$ ATTRIBUTES REFERENCE	:: TextCodepage
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: TextVisualLayout	
				!DEC$ ATTRIBUTES REFERENCE	:: TextVisualLayout
				INTEGER*4, INTENT(OUT), OPTIONAL	:: $STATUS	 ! Method status
				!DEC$ ATTRIBUTES REFERENCE			:: $STATUS
				INTEGER*4 $$STATUS
				INTEGER(INT_PTR_KIND()) invokeargs
				invokeargs = AUTOALLOCATEINVOKEARGS()
				IF (PRESENT(Filename)) CALL AUTOADDARG(invokeargs, '$ARG1', Filename, AUTO_ARG_IN)
				IF (PRESENT(FileFormat)) CALL AUTOADDARG(invokeargs, '$ARG2', FileFormat, AUTO_ARG_IN)
				IF (PRESENT(Password)) CALL AUTOADDARG(invokeargs, '$ARG3', Password, AUTO_ARG_IN)
				IF (PRESENT(WriteResPassword)) CALL AUTOADDARG(invokeargs, '$ARG4', WriteResPassword, AUTO_ARG_IN)
				IF (PRESENT(ReadOnlyRecommended)) CALL AUTOADDARG(invokeargs, '$ARG5', ReadOnlyRecommended, AUTO_ARG_IN)
				IF (PRESENT(CreateBackup)) CALL AUTOADDARG(invokeargs, '$ARG6', CreateBackup, AUTO_ARG_IN)
				IF (PRESENT(AccessMode)) CALL AUTOADDARG(invokeargs, '$ARG7', AccessMode)
				IF (PRESENT(ConflictResolution)) CALL AUTOADDARG(invokeargs, '$ARG8', ConflictResolution, AUTO_ARG_IN)
				IF (PRESENT(AddToMru)) CALL AUTOADDARG(invokeargs, '$ARG9', AddToMru, AUTO_ARG_IN)
				IF (PRESENT(TextCodepage)) CALL AUTOADDARG(invokeargs, '$ARG10', TextCodepage, AUTO_ARG_IN)
				IF (PRESENT(TextVisualLayout)) CALL AUTOADDARG(invokeargs, '$ARG11', TextVisualLayout, AUTO_ARG_IN)
				$$STATUS = AUTOINVOKE($OBJECT, 284, invokeargs)
				IF (PRESENT($STATUS)) $STATUS = $$STATUS
				CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
			END SUBROUTINE $Workbook_SaveAs


  			!Workbooks_Open return type is POINTER(p, INTEGER(INT_PTR_KIND()))
			INTEGER(INT_PTR_KIND()) FUNCTION Workbooks_Open($OBJECT, Filename, UpdateLinks, ReadOnly, Format, Password, WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable, Notify, Converter, AddToMru, $STATUS)
				!DEC$ ATTRIBUTES DLLEXPORT	:: Workbooks_Open
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				CHARACTER*(*), INTENT(IN)	:: Filename	! BSTR
				!DEC$ ATTRIBUTES REFERENCE	:: Filename
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: UpdateLinks	
				!DEC$ ATTRIBUTES REFERENCE	:: UpdateLinks
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: ReadOnly	
				!DEC$ ATTRIBUTES REFERENCE	:: ReadOnly
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Format	
				!DEC$ ATTRIBUTES REFERENCE	:: Format
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Password	
				!DEC$ ATTRIBUTES REFERENCE	:: Password
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: WriteResPassword	
				!DEC$ ATTRIBUTES REFERENCE	:: WriteResPassword
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: IgnoreReadOnlyRecommended	
				!DEC$ ATTRIBUTES REFERENCE	:: IgnoreReadOnlyRecommended
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Origin	
				!DEC$ ATTRIBUTES REFERENCE	:: Origin
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Delimiter	
				!DEC$ ATTRIBUTES REFERENCE	:: Delimiter
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Editable	
				!DEC$ ATTRIBUTES REFERENCE	:: Editable
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Notify	
				!DEC$ ATTRIBUTES REFERENCE	:: Notify
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Converter	
				!DEC$ ATTRIBUTES REFERENCE	:: Converter
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: AddToMru	
				!DEC$ ATTRIBUTES REFERENCE	:: AddToMru
				INTEGER*4, INTENT(OUT), OPTIONAL	:: $STATUS	 ! Method status
				!DEC$ ATTRIBUTES REFERENCE			:: $STATUS
				INTEGER(INT_PTR_KIND()), VOLATILE :: $RETURN
				INTEGER*4 $$STATUS
				INTEGER(INT_PTR_KIND()) invokeargs
				invokeargs = AUTOALLOCATEINVOKEARGS()
				CALL AUTOADDARG(invokeargs, '$RETURN', $RETURN, AUTO_ARG_OUT, VT_DISPATCH)
				CALL AUTOADDARG(invokeargs, '$ARG1', Filename, AUTO_ARG_IN, VT_BSTR)
				IF (PRESENT(UpdateLinks)) CALL AUTOADDARG(invokeargs, '$ARG2', UpdateLinks, AUTO_ARG_IN)
				IF (PRESENT(ReadOnly)) CALL AUTOADDARG(invokeargs, '$ARG3', ReadOnly, AUTO_ARG_IN)
				IF (PRESENT(Format)) CALL AUTOADDARG(invokeargs, '$ARG4', Format, AUTO_ARG_IN)
				IF (PRESENT(Password)) CALL AUTOADDARG(invokeargs, '$ARG5', Password, AUTO_ARG_IN)
				IF (PRESENT(WriteResPassword)) CALL AUTOADDARG(invokeargs, '$ARG6', WriteResPassword, AUTO_ARG_IN)
				IF (PRESENT(IgnoreReadOnlyRecommended)) CALL AUTOADDARG(invokeargs, '$ARG7', IgnoreReadOnlyRecommended, AUTO_ARG_IN)
				IF (PRESENT(Origin)) CALL AUTOADDARG(invokeargs, '$ARG8', Origin, AUTO_ARG_IN)
				IF (PRESENT(Delimiter)) CALL AUTOADDARG(invokeargs, '$ARG9', Delimiter, AUTO_ARG_IN)
				IF (PRESENT(Editable)) CALL AUTOADDARG(invokeargs, '$ARG10', Editable, AUTO_ARG_IN)
				IF (PRESENT(Notify)) CALL AUTOADDARG(invokeargs, '$ARG11', Notify, AUTO_ARG_IN)
				IF (PRESENT(Converter)) CALL AUTOADDARG(invokeargs, '$ARG12', Converter, AUTO_ARG_IN)
				IF (PRESENT(AddToMru)) CALL AUTOADDARG(invokeargs, '$ARG13', AddToMru, AUTO_ARG_IN)
				$$STATUS = AUTOINVOKE($OBJECT, 682, invokeargs)
				IF (PRESENT($STATUS)) $STATUS = $$STATUS
				Workbooks_Open = $RETURN
				CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
			END FUNCTION Workbooks_Open


 			INTEGER*4 FUNCTION $Worksheet_GetIndex($OBJECT, $STATUS)
				!DEC$ ATTRIBUTES DLLEXPORT	:: $Worksheet_GetIndex
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				INTEGER*4, INTENT(OUT), OPTIONAL	:: $STATUS	 ! Method status
				!DEC$ ATTRIBUTES REFERENCE			:: $STATUS
				INTEGER*4, VOLATILE :: $RETURN
				INTEGER*4 $$STATUS
				INTEGER(INT_PTR_KIND()) invokeargs
				invokeargs = AUTOALLOCATEINVOKEARGS()
				CALL AUTOADDARG(invokeargs, 'Index', $RETURN, AUTO_ARG_OUT)
				$$STATUS = AUTOGETPROPERTYBYID($OBJECT, 486, invokeargs)
				IF (PRESENT($STATUS)) $STATUS = $$STATUS
				$Worksheet_GetIndex = $RETURN
				CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
			END FUNCTION $Worksheet_GetIndex


  			CHARACTER*(2048) FUNCTION $Worksheet_GetName($OBJECT, $STATUS)
				!DEC$ ATTRIBUTES DLLEXPORT	:: $Worksheet_GetName
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				INTEGER*4, INTENT(OUT), OPTIONAL	:: $STATUS	 ! Method status
				!DEC$ ATTRIBUTES REFERENCE			:: $STATUS
				CHARACTER*(2048), VOLATILE :: $RETURN
				INTEGER*4 $$STATUS
				INTEGER(INT_PTR_KIND()) invokeargs
				invokeargs = AUTOALLOCATEINVOKEARGS()
				CALL AUTOADDARG(invokeargs, 'Name', $RETURN, AUTO_ARG_OUT, VT_BSTR)
				$$STATUS = AUTOGETPROPERTYBYID($OBJECT, 110, invokeargs)
				IF (PRESENT($STATUS)) $STATUS = $$STATUS
				$Worksheet_GetName = $RETURN
				CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
			END FUNCTION $Worksheet_GetName
    			INTEGER(INT_PTR_KIND()) FUNCTION Worksheets_Add($OBJECT, Before, After, Count, Type, $STATUS)
				!DEC$ ATTRIBUTES DLLEXPORT	:: Worksheets_Add
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Before	
				!DEC$ ATTRIBUTES REFERENCE	:: Before
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: After	
				!DEC$ ATTRIBUTES REFERENCE	:: After
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Count	
				!DEC$ ATTRIBUTES REFERENCE	:: Count
				TYPE (VARIANT), INTENT(IN), OPTIONAL	:: Type	
				!DEC$ ATTRIBUTES REFERENCE	:: Type
				INTEGER*4, INTENT(OUT), OPTIONAL	:: $STATUS	 ! Method status
				!DEC$ ATTRIBUTES REFERENCE			:: $STATUS
				INTEGER(INT_PTR_KIND()), VOLATILE :: $RETURN
				INTEGER*4 $$STATUS
				INTEGER(INT_PTR_KIND()) invokeargs
				invokeargs = AUTOALLOCATEINVOKEARGS()
				CALL AUTOADDARG(invokeargs, '$RETURN', $RETURN, AUTO_ARG_OUT, VT_DISPATCH)
				IF (PRESENT(Before)) CALL AUTOADDARG(invokeargs, '$ARG1', Before, AUTO_ARG_IN)
				IF (PRESENT(After)) CALL AUTOADDARG(invokeargs, '$ARG2', After, AUTO_ARG_IN)
				IF (PRESENT(Count)) CALL AUTOADDARG(invokeargs, '$ARG3', Count, AUTO_ARG_IN)
				IF (PRESENT(Type)) CALL AUTOADDARG(invokeargs, '$ARG4', Type, AUTO_ARG_IN)
				$$STATUS = AUTOINVOKE($OBJECT, 181, invokeargs)
				IF (PRESENT($STATUS)) $STATUS = $$STATUS
				Worksheets_Add = $RETURN
				CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
			END FUNCTION Worksheets_Add

  
  			INTEGER*4 FUNCTION Worksheets_GetCount($OBJECT, $STATUS)
				!DEC$ ATTRIBUTES DLLEXPORT	:: Worksheets_GetCount
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				INTEGER*4, INTENT(OUT), OPTIONAL	:: $STATUS	 ! Method status
				!DEC$ ATTRIBUTES REFERENCE			:: $STATUS
				INTEGER*4, VOLATILE :: $RETURN
				INTEGER*4 $$STATUS
				INTEGER(INT_PTR_KIND()) invokeargs
				invokeargs = AUTOALLOCATEINVOKEARGS()
				CALL AUTOADDARG(invokeargs, 'Count', $RETURN, AUTO_ARG_OUT)
				$$STATUS = AUTOGETPROPERTYBYID($OBJECT, 118, invokeargs)
				IF (PRESENT($STATUS)) $STATUS = $$STATUS
				Worksheets_GetCount = $RETURN
				CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
			END FUNCTION Worksheets_GetCount





end module modExcel_Interfaces