mibuso.com

Microsoft Business Solutions online community
It is currently Wed Jun 19, 2013 11:12 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: formatting within excelbuffer
PostPosted: Wed Feb 15, 2012 4:40 pm 
Offline

Joined: Wed Apr 20, 2011 6:27 pm
Posts: 166
Country: Tunisia (tn)
Hi all,
Who knows how can I set the background color of a column when exporting a report to excel with excel buffer.
And how can I control the font size.
Thanks


Top
 Profile E-mail  
 
 Post subject: Re: formatting within excelbuffer
PostPosted: Wed Feb 15, 2012 9:09 pm 
Offline

Joined: Tue Oct 18, 2005 9:47 am
Posts: 75
Location: Wellington
Country: New Zealand (nz)
You can do this by adding the following lines to the CreateSheet function in table 370 - Excel Buffer

Code: Select all
IF "Font Size" <> 0 THEN
  XlWrkSht.Range(xlColID + xlRowID).Font.Size := "Font Size";

IF "Background Colour" <> 0 THEN
  XlWrkSht.Range(xlColID + xlRowID).Interior.ColorIndex := "Background Colour";


where "Font Size" and "Background Colour" are new fields in the Excel Buffer table.
Add the lines in the REPEAT UNTIL loop after

Code: Select all
IF Underline THEN
  XlWrkSht.Range(xlColID + xlRowID).Borders.Item(XlEdgeBottom).LineStyle := XlContinuous;


Regards

_________________
Claus Hamann

www.AcumenConsulting.co.nz


Top
 Profile  
 
 Post subject: Re: formatting within excelbuffer
PostPosted: Wed Feb 15, 2012 11:23 pm 
Offline

Joined: Wed Apr 20, 2011 6:27 pm
Posts: 166
Country: Tunisia (tn)
Thanks for your replay, but tell how can I exploit it in the report.
Thanks


Top
 Profile E-mail  
 
 Post subject: Re: formatting within excelbuffer
PostPosted: Thu Feb 16, 2012 7:39 am 
Offline

Joined: Thu Feb 16, 2012 7:28 am
Posts: 11
Country: India (in)
hi guys,
I m new to nav
can u tel me how i wil get xlSheet and XlWrkBk objects;
i knw only excel buffer object from that i hav used createbook();
please tel me all thing about this.


Top
 Profile E-mail  
 
 Post subject: Re: formatting within excelbuffer
PostPosted: Thu Feb 16, 2012 7:43 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4252
Location: New Delhi
Country: India (in)
They are automation Variables..

Check Excel Buffer Table - 370

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/


Top
 Profile  
 
 Post subject: Re: formatting within excelbuffer
PostPosted: Thu Feb 16, 2012 7:47 am 
Offline

Joined: Tue Oct 18, 2005 9:47 am
Posts: 75
Location: Wellington
Country: New Zealand (nz)
You have to find the places in the report that insets the data you want colored or changed size on and then update the code to populated the new fields in the Excel Buffer table.

Regards

_________________
Claus Hamann

www.AcumenConsulting.co.nz


Top
 Profile  
 
 Post subject: Re: formatting within excelbuffer
PostPosted: Thu Feb 16, 2012 8:00 am 
Offline

Joined: Thu Feb 16, 2012 7:28 am
Posts: 11
Country: India (in)
Hi mohana, can u brief what autamtion variable how to creat that and use it


Top
 Profile E-mail  
 
 Post subject: Re: formatting within excelbuffer
PostPosted: Thu Feb 16, 2012 8:05 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4252
Location: New Delhi
Country: India (in)
Did you check Table Excel Buffer..how it is created and used?
Search the forum please..

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: badr, MBerger, nikeman77 and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: