<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem, with accessing Excel through COM in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-accessing-Excel-through-COM/m-p/820081#M47233</link>
    <description>I wanted to change original function i have got from Fortran Module Wizard for Excel02.&lt;BR /&gt;The variables RowIndex and ColumnIndex are originally supposed to be VARIANTS. I thought&lt;BR /&gt;to make them integers, and inside of the body of the function to apply neccessary&lt;BR /&gt;transformation to variants. The return value should be pointer &lt;BR /&gt;to range object (specified by RowIndex and ColIndex).&lt;BR /&gt;Does any have an idea why this does not work?&lt;BR /&gt; &lt;BR /&gt;     &lt;BR /&gt;FUNCTION Worksheet_Cells($OBJECT,RowIndex,ColumnIndex,$STATUS)&lt;BR /&gt; 	&lt;BR /&gt;        use....!whatever is neccessary&lt;BR /&gt;        &lt;BR /&gt;        !DEC$ ATTRIBUTES DLLEXPORT :: Worksheet_Cells&lt;BR /&gt;	implicit none&lt;BR /&gt;	integer(INT_PTR_KIND()),intent(IN) :: $OBJECT !Object Pointer&lt;BR /&gt;	!DEC$ ATTRIBUTES VALUE :: $OBJECT&lt;BR /&gt;	integer :: RowIndex&lt;BR /&gt;	!DEC$ ATTRIBUTES REFERENCE :: RowIndex&lt;BR /&gt;	integer :: ColumnIndex&lt;BR /&gt;	!DEC$ ATTRIBUTES REFERENCE	:: ColumnIndex&lt;BR /&gt;	integer(4),intent(OUT),optional :: $STATUS	 ! Method status&lt;BR /&gt;	!DEC$ ATTRIBUTES REFERENCE :: $STATUS&lt;BR /&gt;	integer(4)              $$STATUS,ret&lt;BR /&gt;	integer(INT_PTR_KIND()) invokeargs&lt;BR /&gt;	integer(INT_PTR_KIND()),volatile :: $RETURN&lt;BR /&gt;	integer(INT_PTR_KIND()) Worksheet_Cells&lt;BR /&gt;	type(VARIANT)           vRowIndex,vColumnIndex&lt;BR /&gt;&lt;BR /&gt;	!transformation of the integers in variants..might be wrong&lt;BR /&gt;        call VariantInit(vRowIndex)&lt;BR /&gt;	vRowIndex%VT=VT_I2&lt;BR /&gt;	vRowIndex%VU%LONG_VAL=RowIndex&lt;BR /&gt;	call VariantInit(vColumnIndex)&lt;BR /&gt;	vColumnIndex%VT=VT_I2&lt;BR /&gt;	vColumnIndex%VU%LONG_VAL=ColumnIndex&lt;BR /&gt;&lt;BR /&gt;	invokeargs=AUTOALLOCATEINVOKEARGS()&lt;BR /&gt;	call AUTOADDARG(invokeargs,'$RETURN',$RETURN,AUTO_ARG_OUT)&lt;BR /&gt;	call AUTOADDARG(invokeargs,'$ARG1',vRowIndex,AUTO_ARG_IN)&lt;BR /&gt;	call AUTOADDARG(invokeargs,'$ARG2',vColumnIndex,AUTO_ARG_IN)&lt;BR /&gt;	$$STATUS=AUTOINVOKE($OBJECT,238,invokeargs)&lt;BR /&gt;	if(present($STATUS)) $STATUS=$$STATUS&lt;BR /&gt;	Worksheet_Cells=$RETURN&lt;BR /&gt;	call AUTODEALLOCATEINVOKEARGS(invokeargs)	&lt;BR /&gt;	ret=VariantClear(vRowIndex)&lt;BR /&gt;	ret=VariantClear(vColumnIndex)&lt;BR /&gt;	END FUNCTION Worksheet_Cells&lt;BR /&gt;&lt;BR /&gt;thnaks</description>
    <pubDate>Thu, 06 Mar 2003 22:51:15 GMT</pubDate>
    <dc:creator>cobek</dc:creator>
    <dc:date>2003-03-06T22:51:15Z</dc:date>
    <item>
      <title>Problem, with accessing Excel through COM</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-accessing-Excel-through-COM/m-p/820081#M47233</link>
      <description>I wanted to change original function i have got from Fortran Module Wizard for Excel02.&lt;BR /&gt;The variables RowIndex and ColumnIndex are originally supposed to be VARIANTS. I thought&lt;BR /&gt;to make them integers, and inside of the body of the function to apply neccessary&lt;BR /&gt;transformation to variants. The return value should be pointer &lt;BR /&gt;to range object (specified by RowIndex and ColIndex).&lt;BR /&gt;Does any have an idea why this does not work?&lt;BR /&gt; &lt;BR /&gt;     &lt;BR /&gt;FUNCTION Worksheet_Cells($OBJECT,RowIndex,ColumnIndex,$STATUS)&lt;BR /&gt; 	&lt;BR /&gt;        use....!whatever is neccessary&lt;BR /&gt;        &lt;BR /&gt;        !DEC$ ATTRIBUTES DLLEXPORT :: Worksheet_Cells&lt;BR /&gt;	implicit none&lt;BR /&gt;	integer(INT_PTR_KIND()),intent(IN) :: $OBJECT !Object Pointer&lt;BR /&gt;	!DEC$ ATTRIBUTES VALUE :: $OBJECT&lt;BR /&gt;	integer :: RowIndex&lt;BR /&gt;	!DEC$ ATTRIBUTES REFERENCE :: RowIndex&lt;BR /&gt;	integer :: ColumnIndex&lt;BR /&gt;	!DEC$ ATTRIBUTES REFERENCE	:: ColumnIndex&lt;BR /&gt;	integer(4),intent(OUT),optional :: $STATUS	 ! Method status&lt;BR /&gt;	!DEC$ ATTRIBUTES REFERENCE :: $STATUS&lt;BR /&gt;	integer(4)              $$STATUS,ret&lt;BR /&gt;	integer(INT_PTR_KIND()) invokeargs&lt;BR /&gt;	integer(INT_PTR_KIND()),volatile :: $RETURN&lt;BR /&gt;	integer(INT_PTR_KIND()) Worksheet_Cells&lt;BR /&gt;	type(VARIANT)           vRowIndex,vColumnIndex&lt;BR /&gt;&lt;BR /&gt;	!transformation of the integers in variants..might be wrong&lt;BR /&gt;        call VariantInit(vRowIndex)&lt;BR /&gt;	vRowIndex%VT=VT_I2&lt;BR /&gt;	vRowIndex%VU%LONG_VAL=RowIndex&lt;BR /&gt;	call VariantInit(vColumnIndex)&lt;BR /&gt;	vColumnIndex%VT=VT_I2&lt;BR /&gt;	vColumnIndex%VU%LONG_VAL=ColumnIndex&lt;BR /&gt;&lt;BR /&gt;	invokeargs=AUTOALLOCATEINVOKEARGS()&lt;BR /&gt;	call AUTOADDARG(invokeargs,'$RETURN',$RETURN,AUTO_ARG_OUT)&lt;BR /&gt;	call AUTOADDARG(invokeargs,'$ARG1',vRowIndex,AUTO_ARG_IN)&lt;BR /&gt;	call AUTOADDARG(invokeargs,'$ARG2',vColumnIndex,AUTO_ARG_IN)&lt;BR /&gt;	$$STATUS=AUTOINVOKE($OBJECT,238,invokeargs)&lt;BR /&gt;	if(present($STATUS)) $STATUS=$$STATUS&lt;BR /&gt;	Worksheet_Cells=$RETURN&lt;BR /&gt;	call AUTODEALLOCATEINVOKEARGS(invokeargs)	&lt;BR /&gt;	ret=VariantClear(vRowIndex)&lt;BR /&gt;	ret=VariantClear(vColumnIndex)&lt;BR /&gt;	END FUNCTION Worksheet_Cells&lt;BR /&gt;&lt;BR /&gt;thnaks</description>
      <pubDate>Thu, 06 Mar 2003 22:51:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-accessing-Excel-through-COM/m-p/820081#M47233</guid>
      <dc:creator>cobek</dc:creator>
      <dc:date>2003-03-06T22:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem, with accessing Excel through COM</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-accessing-Excel-through-COM/m-p/820082#M47234</link>
      <description>Ok..now it works, sorry for disturbing...for those who might be interested this is how it should look like:&lt;BR /&gt;&lt;BR /&gt;  	FUNCTION Worksheet_Cells($OBJECT,RowIndex,ColumnIndex,$STATUS)&lt;BR /&gt;	!DEC$ ATTRIBUTES DLLEXPORT :: Worksheet_Cells&lt;BR /&gt;	implicit none&lt;BR /&gt;	integer(INT_PTR_KIND()),intent(IN) :: $OBJECT !Object Pointer&lt;BR /&gt;	!DEC$ ATTRIBUTES VALUE :: $OBJECT&lt;BR /&gt;	integer :: RowIndex&lt;BR /&gt;	!DEC$ ATTRIBUTES REFERENCE :: RowIndex&lt;BR /&gt;	integer :: ColumnIndex&lt;BR /&gt;	!DEC$ ATTRIBUTES VALUE	:: ColumnIndex&lt;BR /&gt;	integer(4),intent(OUT),optional :: $STATUS	 ! Method status&lt;BR /&gt;	!DEC$ ATTRIBUTES REFERENCE :: $STATUS&lt;BR /&gt;	integer(4)                          $$STATUS,ret&lt;BR /&gt;	integer(INT_PTR_KIND())             invokeargs&lt;BR /&gt;	integer(INT_PTR_KIND()),volatile :: $RETURN&lt;BR /&gt;	integer(INT_PTR_KIND())             Worksheet_Cells&lt;BR /&gt;	type(VARIANT)                       vRowIndex,vColumnIndex&lt;BR /&gt;&lt;BR /&gt;	call VariantInit(vRowIndex)&lt;BR /&gt;	vRowIndex%VT=VT_I2&lt;BR /&gt;	vRowIndex%VU%SHORT_VAL=RowIndex&lt;BR /&gt;	call VariantInit(vColumnIndex)&lt;BR /&gt;	vColumnIndex%VT=VT_I2&lt;BR /&gt;	vColumnIndex%VU%SHORT_VAL=ColumnIndex&lt;BR /&gt;	invokeargs=AUTOALLOCATEINVOKEARGS()&lt;BR /&gt;	call AUTOADDARG(invokeargs,'Cells',$RETURN,AUTO_ARG_OUT,VT_DISPATCH)&lt;BR /&gt;	call AUTOADDARG(invokeargs,'$ARG1',vRowIndex,AUTO_ARG_IN)&lt;BR /&gt;	call AUTOADDARG(invokeargs,'$ARG2',vColumnIndex,AUTO_ARG_IN)&lt;BR /&gt;	!$$STATUS=AUTOINVOKE($OBJECT,238,invokeargs)&lt;BR /&gt;	$$STATUS=AUTOGETPROPERTYBYID($OBJECT,238,invokeargs)&lt;BR /&gt;	if(present($STATUS)) $STATUS=$$STATUS&lt;BR /&gt;	Worksheet_Cells=$RETURN&lt;BR /&gt;	call AUTODEALLOCATEINVOKEARGS(invokeargs)	&lt;BR /&gt;	ret=VariantClear(vRowIndex)&lt;BR /&gt;	ret=VariantClear(vColumnIndex)&lt;BR /&gt;	END FUNCTION Worksheet_Cells&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Mar 2003 00:33:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-accessing-Excel-through-COM/m-p/820082#M47234</guid>
      <dc:creator>cobek</dc:creator>
      <dc:date>2003-03-07T00:33:02Z</dc:date>
    </item>
  </channel>
</rss>

