Excel Buffer Table Functions

Prajeesh_Nair
Member Posts: 70
Hi guys
,
I really want to know more about Excel buffer table in Nav r2. There are plenty of functions defined is there any proper Documentation of the functions (with examples) :-k . Actually I want to insert outer boarder to each cell I am inserting in Excel. I am using the buffer table, for this purpose I was searching the functions in the excel buffer. I think I found the function which will help me –BorderAround(). Can anyone guide me through the usage, initialization of the automation variable? Waiting for your valuable suggestions [-o< .
With Regards
Prajeesh

I really want to know more about Excel buffer table in Nav r2. There are plenty of functions defined is there any proper Documentation of the functions (with examples) :-k . Actually I want to insert outer boarder to each cell I am inserting in Excel. I am using the buffer table, for this purpose I was searching the functions in the excel buffer. I think I found the function which will help me –BorderAround(). Can anyone guide me through the usage, initialization of the automation variable? Waiting for your valuable suggestions [-o< .
With Regards
Prajeesh
0
Comments
-
Prajeesh,
I moved away from using the excel buffer table and just created a codeunit with various functions that could be called for formatting a cell. Here's the code you're looking for to create a box around a cell:
xlSheet[SheetNumber].Range(CellRange).Borders.LineStyle := 1;
Where SheetNumber is an integer of the sheet you're writing to of xlSheet (Worksheet automation type - array of 200 dim's).
This works like a charm!So You Want to be NAV Developer?
http://www.archerpoint.com/blog/faithie-robertson
A blog by Faithie Robertson0 -
Hi Robertson
,
Thanks for your replay =D> . Please can u make it more elaborate :-k .
TempExcelBufferRec.INIT;
TempExcelBufferRec.VALIDATE("Row No.",RowNo);
TempExcelBufferRec.VALIDATE("Column No.",ColumnNo);
TempExcelBufferRec."Cell Value as Text" := CellValue;
TempExcelBufferRec.Formula := '';
TempExcelBufferRec.Bold := Bold;
TempExcelBufferRec.Italic := Italic;
TempExcelBufferRec.Underline := UnderLine;
xlSheet[SheetNumber].Range(CellRange).Borders.LineStyle := 1;
TempExcelBufferRec.INSERT;
I have created a fn Enter Cell in my report which is using Buffer table. Can i add your code in it and get the results. Please give me your valuble advice. Can you send me any Fob's :oops: so that i can go through it and learn more.
With Regards
Prajeesh0 -
Dear Rober :whistle: ,
It worked =D> , But i would like to knew is the same possible by using Excel buffer table. I think the appropriate Function is BorderAround :-k . Can u guide to the usage with some Fobs or coded.?0 -
Hi friend,
Sorry to take so long to respond.
I'm seeing the "BorderAround" function as:
XlRange1 := XlWrkSht.Range(RangeName);
XlRange1.BorderAround(1);
This looks to be the same thing as what I gave you. The only thing possibly different is that it's not referencing a sheet, so in code you'd have to access the sheet first, and then create the range name, and then execute the border.
It's always easier for me to just do this through a codeunit I've developed that calls functions to do it all for me. You can access any excel code you want by using the macro record and edit functions within excel to show you the various classes and parms needed. I've simply done that, and made each action into a function. Then each function can be called using parms from one single function that writes the cell contents, formats the data, does borders, colorings, etc...
I'll send you a sample.
Blessings!
FLRSo You Want to be NAV Developer?
http://www.archerpoint.com/blog/faithie-robertson
A blog by Faithie Robertson0
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