Format data in creating excel output
couberpu
Member Posts: 317
Hi ALL,
I have Navision 3.70b Navision run time with SQL options.
I am trying to create an Excel output using Automation. Everything is working but I nned to format the data, like in Excel Format Cells.., with custom format like '00000;#####'. Can any one give me a direction on how to do it and Is there a Navision docutmentation for doing something like this?
Thanks a lot,
CouberPu
I have Navision 3.70b Navision run time with SQL options.
I am trying to create an Excel output using Automation. Everything is working but I nned to format the data, like in Excel Format Cells.., with custom format like '00000;#####'. Can any one give me a direction on how to do it and Is there a Navision docutmentation for doing something like this?
Thanks a lot,
CouberPu
0
Answers
-
is the "###" your field and you want to add zero's in front?0
-
Yes, something like that. It is for formating customer account# like 00001, 05675. When customer account like 00001 and 05675 or Zip code like 08600, I would use Excel Custom format 00000;##### to make sure that I did not lost the leading 0. Now I am creating Excel output, along with Navision report output, in Navision report, I would like to be able to do something like WorkSheet.Range('A1').<Format> := <FormatStr>. But I have no idea what <Format> and <FormatStr> are!
Thanks,
CouberPu0 -
I found the answer of my question in Microsoft Visual Basic Help.
I made the change to my code like this:
WorkSheet.Range('A'+FORMAT(i)).Value := Customer."No.";
WorkSheet.Range('A'+FORMAT(i)).NumberFormat:= '00000;#####';
and the output has leading zeros on customer#.
Thanks,
CouberPu0
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
- 611 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