ExcelCol function via X#
Posted: Mon May 23, 2022 2:13 pm
In VO we created an Excel Com library. Two function were not generated but nevertheless present. One is ExcelCol
This returns the Excel column letters from a number, so you can move to the next column, e.g.
ExcelCol(1)="A"
ExcelCol(2)="B"
ExcelCol(27)="AA"
etc
In our VO generated interface called Excel2016OLE. we just added:
_DLL FUNCTION ExcelCol( nCol AS WORD ) AS STRING:Excel2016OLE.ExcelCol
and then we can use it.
In X# we replaced the calls with Interop calls, e.g.
oRange:VerticalAlignment := Microsoft.Office.Interop.Excel.XlVAlign.xlVAlignTop
But there does not seem to be an interop call for ExcelCol.
Does anyone know how to access that? Otherwise we have to write something for it but it should be present as it does work from VO.
Dick
This returns the Excel column letters from a number, so you can move to the next column, e.g.
ExcelCol(1)="A"
ExcelCol(2)="B"
ExcelCol(27)="AA"
etc
In our VO generated interface called Excel2016OLE. we just added:
_DLL FUNCTION ExcelCol( nCol AS WORD ) AS STRING:Excel2016OLE.ExcelCol
and then we can use it.
In X# we replaced the calls with Interop calls, e.g.
oRange:VerticalAlignment := Microsoft.Office.Interop.Excel.XlVAlign.xlVAlignTop
But there does not seem to be an interop call for ExcelCol.
Does anyone know how to access that? Otherwise we have to write something for it but it should be present as it does work from VO.
Dick