Excel in Navision

nicolenicole Member Posts: 25
edited 2004-12-16 in Navision Attain
hi....i'm creating an excel output using Navision's C/AL... i wish to know what property will i use to set the alignment of a cell in excel? for instance, i want to make a certain cell right justfied.

ex. Worksheet.Range('A4').????????

thanks in advance!

:)

Comments

  • ArhontisArhontis Member Posts: 667
    Hi,

    You can see alot of info about any available routine by opening Excel->tools->Macro->Visual Basic Editor->Help->Microsoft Visual Basic Help.

    It lists every object and its properties, function. It even has examples sometimes. :whistle:
  • janpieterjanpieter Member Posts: 298
    And if you are lazy, then first record a macro in Excel, simulating exactly what you want to do in Navision.

    Then go to the visual basic editor as Arhontis described, click through the modules and you will find the recorded macro there in VBA code.

    The only thing you have to do then is translate this code into C/AL syntax.
    In a world without Borders or Fences, who needs Windows and Gates?
  • wonmowonmo Member Posts: 139
    gaut_xlSheet.Range(...).HorizontalAlignment := 3;

    This center justifies the cell. You are using enumerators so 1 or 2 probably right justifies the cell.
  • BGIBGI Member Posts: 176
    There is also an easy way incorperated in Navision. Take a look at table 370: excel buffer. Fill in the file with your data, and the call the function createsheet, and voila....
    Rgds
    Benny Giebens
Sign In or Register to comment.