How we can do Export to Excel with color
devjangra
Member Posts: 4
Hi,
I have a problem, i want to export to excel with any field in color in Nav. 4.0. I know how to export to excel but i don't know how to make it color. Please suggest me. I use "Excel Buffer' table for export to excel.
Thanks
Devjangra
I have a problem, i want to export to excel with any field in color in Nav. 4.0. I know how to export to excel but i don't know how to make it color. Please suggest me. I use "Excel Buffer' table for export to excel.
Thanks
Devjangra
0
Comments
-
it's simple. to know what you must do in Navision (here u use Automation EXCEL) do following:
Open Excel and recording a Marco. Than colour your field. Stop the Macro recording. See the Macro code. Now you know, how you can colour a field. These vb code you must "transfer" (not directly) to your C/AL (Automation) Code.
regards. (Hope it's comprehensible)Do you make it right, it works too!0 -
Hello,
Can you explain more?????
I'm using a macro and I call it from navision using xlApp.Run(MacroName);
but I got an error msg at the end
Any help???
ThanksRegards
Hanen TALBI0 -
1- Record a new Macro.
2- Change colour to a field.
3- Stop the macro.
4- View macro code.
5- Copy macro code and paste it in Navision.
6- Change the code to adapt it to Navision.
Bye0 -
If you want to continue to use the excel buffer table.
Add a field Color as an integer or option .
then look at how the function "CreateSheet" handles Bold,Italic and Comment
You can use similar code to handle color, as colorindex is a property of the Font object in Excel.
Hope this helps
Steve0 -
I tried with macro as you said but it didn't work, I got an error message telling that macro are desactivated................
What shall I can I do????Regards
Hanen TALBI0 -
Hi
The instruction you need is thatXlSheet.Range('FIELD').Interior.ColorIndex:= number;
Number = 3 - Red
6 - Yellow
4 - Green
5 - Blue
1 - Black
Bye0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions