Excel Automation landscape property question

jordi79
Member Posts: 280
I am having some problems in getting landscape property from an opened Excel worksheet.
When the code above is executed, it pops up with the message of 64. But the valid selection for pagesetup according to excel documentation is 1 for Portrait and 2 for Landscape. Can any provide any explanation for the above?
I also tried with some other page setup property, and I also get the value 64 or 65. But not the actual documented values in Excel.
CREATE(xlApp); xlApp.Workbooks.Open('FileName.xls'); xlWorkBook := xlApp.ActiveWorkbook; xlWorkSheet := xlWorkBook.Worksheets.Item(1); message(format(xlWorkSheet.PageSetup.Orientation));
When the code above is executed, it pops up with the message of 64. But the valid selection for pagesetup according to excel documentation is 1 for Portrait and 2 for Landscape. Can any provide any explanation for the above?
I also tried with some other page setup property, and I also get the value 64 or 65. But not the actual documented values in Excel.
0
Comments
-
Check the logic in the Excel Buffer table for function CreateSheet. There's an example there of setting the orientation you can use.So You Want to be NAV Developer?
http://www.archerpoint.com/blog/faithie-robertson
A blog by Faithie Robertson0 -
Hi Faithie,
Yes. I can set a sheet to landscape. But what I want to do, is to open an excel sheet, and determine whether the sheet is in landscape or in portrait and this is what i am not able to do. what i want to achieve, is to read the landscape or portrait setting in an excel sheet.0
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