Hi Markus,
Thanks for the updated document, getting better and better! Although I am afraid you will need to make some changes related to COM, see below. Also it would be nice to give some info why the compiler in X# requires some of the changes, but this is probably a task for the devteam

In the next days/weeks I will collect the most common compiler errors reported in ported code and list them together with a small explanation and resolution, so it can be used as a reference.
Also a small comment regarding return values of ASSIGNs, those are completely ignored, because by definition in .Net an ASSIGN (Property setter) does not return a value, so you might want to change the code (remove return type from definition and return value from RETURN statement) so it reflects that.
Regarding the runtime problem with Excel, I see 2 COM-related issues:
1. The message of the runtime exception is "Types extending from COM objects should override all methods of an interface implemented by the base COM class". I searched for this error and according to
www.codeproject.com/Articles/990/Underst...roperability-With-NE
indeed you cannot simply inherit from a COM object. If you do that, then you need to provide all the members that implement the corresponding COM interface. For a very large class like Excel.ApplicationClass I think this is not feasible, so I suggest to change your IMSExcel class so it does not inherit from that class, but it uses it as a member. Of course you can do it a different way, but my solution was to change
CLASS IMSExcel INHERIT MSExcel
to
CLASS IMSExcel
and also add
PROPERTY ExcelObject AS Microsoft.Office.Interop.Excel.ApplicationClass AUTO
then added this to the constructor of the class:
SELF:ExcelObject := Microsoft.Office.Interop.Excel.ApplicationClass{}
and changed also the following:
ACCESS ExcelOK
RETURN SELF:lVisible = SELF:Visible
....
cExcelPath := SELF:Path + "\excel.exe"
...
ASSIGN Visible(lV AS LOGIC)
lVisible := lV
RETURN SELF:Visible := lV
to (just use the properties of the Excel class):
ACCESS ExcelOK
RETURN SELF:lVisible = SELF:ExcelObject:Visible
....
cExcelPath := SELF:ExcelObject:Path + "\excel.exe"
...
ASSIGN Visible(lV AS LOGIC)
lVisible := lV
RETURN SELF:ExcelObject:Visible := lV
that fixes that problem, but there's also:
2. In the _ToExcel() method, in a couple places you are assigning a VO style ARRAY to a Range object, but unfortunately the ARRAY type is X#/vulcan specific, so the COM object does not know how to translate it. Fortunately the solution is easy, you can write a function that converts a VO ARRAY to a .Net Array:
FUNCTION VOToNetArray(aVO AS ARRAY) AS System.Array
// hard coded for 2-dimension ARRAY
LOCAL aNet AS OBJECT[,]
aNet := OBJECT[,]{ALen(aVO) , ALen(aVO[1])}
FOR LOCAL i := 1 AS INT UPTO ALen(aVO)
FOR LOCAL j := 1 AS INT UPTO ALen(aVO
)
anet[i,j] := aVO[i,j]
NEXT
NEXT
RETURN aNet
and then simply change
oRange:Value := aColumns
...
oRange:Value := aListe
to
oRange:Value := VOToNetArray( aColumns )
...
oRange:Value := VOToNetArray( aListe )
Now output to Excel works nicely!
Chris