Excel in Navision

nicole
Member Posts: 25
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!
ex. Worksheet.Range('A4').????????
thanks in advance!

0
Comments
-
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:0 -
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?0 -
gaut_xlSheet.Range(...).HorizontalAlignment := 3;
This center justifies the cell. You are using enumerators so 1 or 2 probably right justifies the cell.0 -
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 Giebens0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions