Text Format while using Automation for Excel

smitapanda
Member Posts: 4
Hi All,
I am developing one report in Automation for Excel.
I am facing problem for printing Item No in excel which start with a 0(zero). for example - 07023001,03028029,03002001 etc.
i have already used '@' fot text format.Also used FORMAT for the cell value.But the excel output shows the item nos without the firts 0 in excel.Example- 7023001,3028029,3002001 etc.
My code is - Printcell(Index,RowNo,FORMAT("Sales Invoice Line"."No."),1,0,false,'@');
Please help what to do.....Thanks in advance !!
I am developing one report in Automation for Excel.
I am facing problem for printing Item No in excel which start with a 0(zero). for example - 07023001,03028029,03002001 etc.
i have already used '@' fot text format.Also used FORMAT for the cell value.But the excel output shows the item nos without the firts 0 in excel.Example- 7023001,3028029,3002001 etc.
My code is - Printcell(Index,RowNo,FORMAT("Sales Invoice Line"."No."),1,0,false,'@');
Please help what to do.....Thanks in advance !!
0
Comments
-
Try this
''''+FORMAT("Sales Invoice Line"."No.")
Search the forum for excel with zeros you will get many solutions.0 -
I tried your solution but it didnt work.
Thanks for your reply0 -
MGM08 wrote:Search the forum for excel with zeros you will get many solutions.0
-
I searched teh forum .But generally people have suggested for using '@' of FORMAT(Value). I have seen using both of these.But not helped.
I think this helps in using Excel buffer.But mine is in Automation.0 -
did you really use '<Value> to put in Excel? the ' is obligatory, this way Excel translates Value as text and no leading zeros are deleted.It is hard to swim against self bloodstream... (c) Old, experienced kamikadze.0
-
smitapanda wrote:I tried your solution but it didnt work.
Thanks for your reply
Are you sure you tried the "4 single quotes" properly?EnterCell(Row,column, ''''+Item."No.", FALSE, FALSE, FALSE);
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