MSOffice 2010 integration

Author: gianni.sandigliano@unifacesolutions.com (gianni)

Importing signatures from MSOffice 2010 applications I got a lot of warnings like these ones: ProgId  [Excel.Application] Library [Excel] CoClass           : excel_Application Message : Using interface [EXCEL__APPLICATION] Interface         : excel__Application Warning : Function ActiveSheet, parameter result_ has an unknown HANDLE type VT_DISPATCH, please supply one Warning : Renamed to [U_EVALUATE] Warning : Renamed to [U_RUN2] Warning : Function Selection, parameter result_ has an unknown HANDLE type VT_DISPATCH, please supply one What do they mean? Should I correct all those signatures before using them? Thanks for any hint! Gianni P.S. Wishing to all Unifacers a wonderful 2015!

6 Comments

  1. Hi Gianni, ActiveSheet returns an object, but this may be of different types. In languages like Java, there is no problem to interrogate what kind of object it is and continue processing. In Uniface, there is no similar functionality. So the conversion uses ?UNKNOWN? instead which cause all that COM errors. So what to do? If you are really REALLY sure the only type of sheets in your workbook is "worksheet" you can change in the signature ?unknown? to WORKSHEET


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. Thanks Uli! Your description is in line with what I've just found on internet: VT_DISPATCH is often recognized as an ActiveX datatype describing a generic ResultSet. A ResultSet can be easily navigated with standard methods. So, basically the signature is defining an handle pointing to an object. Corresponding object structure is dynamic because different objects can be passed through. I do not know (yet) if this could lead to issue(s) but I 'll discover it soon...


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  3. Hi Gianni, in may last year, "Dennis Vorst" posted some issues about EXCEL on uniface.info, perhaps this will give you a hint. I had a very interesting eMail conference with Dennis where we identified problem areas and experimented a lot how to overcome the areas where uniface falls short compared even against JAVA. After I put a lot of hours in some dIToEXCEL implementation concepts, I can state: With a little bit of creativity it is possible to provide an EXCEL interface which gives the average uniface codewriter a lot of comfort dealing with the EXCEL data format. This tool can hadle different installed EXCEL versions found at runtime, so that there is no need to force customersto stay on an old excel version when they use the uniface application.   Happy new Year, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  4. Hi The operation GET_ACTIVESHEET return U_WORKSHEET classification. See http://msdn.microsoft.com/fr-fr/library/office/ff822753%28v=office.15%29.aspx A lot of modification must be made after the import. SET_ZOOM is boolean in PAGESETUP,... RANGE also, we have some modifications. Regards, Antoine


    Author: apicaud (antoine.picaud@free.fr)
  5. according to http://msdn.microsoft.com/en-us/library/office/ff194426%28v=office.15%29.aspx a CHART OBJECT can be held in the activesheet property as well and this will be returned with the get_activesheet.   Microsoft changes a lot in their object trees from version to version. So we see the range which once was a proerty become on object in it's own rights.   Therefore, we use a concept of routines which hide these implementation details from the uniface coder. Depending on the different versions of EXCEL, there are different uniface implementations to reach the desired functionality.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  6. ulrich-merkel said ... Depending on the different versions of EXCEL, there are different uniface implementations to reach the desired functionality.

    After my tests I fully agree with Uli conclusion! Importing MS-Office signatures we are including in Uniface just services interfaces and NOT a real services API; compatibility with different MS-Office versions MUST be implemented in an intermediate software layer. dIToEXCEL mentioned from Uli is an example. Thanks to all for your inputs. Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)