mibuso.com

Microsoft Business Solutions online community
It is currently Mon Oct 20, 2014 11:12 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: The format of the field after exporting to Excel
PostPosted: Thu Jun 21, 2012 3:58 am 
Offline

Joined: Wed Jun 13, 2007 2:07 pm
Posts: 202
Location: India
Country: India (in)
Hi,
In of the Report we have used Excelbuffer Table to export report data to excel.
For one the column we have wrote like below,
Code: Select all
EnterCell(RowNo,5,Format("Item No."),FALSE,FALSE,FALSE);
and the value of Item No is 5-7056.
Where the function Entercell is like this,

Code: Select all
EnterCell(RowNo : Integer;ColumnNo : Integer;CellValue : Text[250];lvBold : Boolean;Italic : Boolean;UnderLine : Boolean
TempExcelBuffer.INIT;
TempExcelBuffer.VALIDATE("Row No.",RowNo);
TempExcelBuffer.VALIDATE("Column No.",ColumnNo);
TempExcelBuffer."Cell Value as Text" := CellValue;
TempExcelBuffer.Formula := '';
TempExcelBuffer.Bold := Bold;
TempExcelBuffer.Italic := Italic;
TempExcelBuffer.Underline := UnderLine;
TempExcelBuffer.INSERT;


but in Excel the Value is coming as May-56 instead of 5-7056. Have anybody encountered this type of case.


Top
 Profile  
 
 Post subject: Re: The format of the field after exporting to Excel
PostPosted: Thu Jun 21, 2012 6:20 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4601
Location: Hyderabad
Country: India (in)
Did you try to send ' before Item No..
Code: Select all
EnterCell(RowNo,5,'''' + Format("Item No."),FALSE,FALSE,FALSE);

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav


Top
 Profile  
 
 Post subject: Re: The format of the field after exporting to Excel
PostPosted: Thu Jun 21, 2012 7:08 am 
Offline

Joined: Wed Jun 13, 2007 2:07 pm
Posts: 202
Location: India
Country: India (in)
Hi Mohan,
Thanks. It is corrected. but I still didn't understand why it as like that even though i have used he format and the cell value was in text.


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Exabot [Bot] and 9 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: