Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

ExcelCol function via X# 23 May 2022 16:13 #22580

  • ic2


  • Posts: 1366
  • 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

    Please Log in or Create an account to join the conversation.

    ExcelCol function via X# 23 May 2022 16:43 #22581

    • robert
    • robert's Avatar


  • Posts: 2874
  • Dick,
    I suspect the Excel2016OLE is created from your own code.
    If you add the source code for ExcelCol() to your X# assembly then it should work

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    ExcelCol function via X# 23 May 2022 22:27 #22588

    • ic2


  • Posts: 1366
  • Indeed Robert, you are right.

    I didn't realize this!

    Dick

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1