Wrong year exported to Excel?

Tiwaz
Member Posts: 98
Hi everyone!
I am exporting my data to Excel using Excel Buffer.
When I write date using ex. EnterCell(21,13,FORMAT("Account Date"),FALSE,FALSE,FALSE,'dd/mm/yyyy',ExcelBuffer."Cell Type"::Text);
I can see in debugger that it grabs the correct value, but when Excel spreadsheet finally opens, it inserts some random date (in my case 25.11.1927.) which is insanity.
Does anyone know why this may happen?
If it helps, I use DotNet to format my Cell Size and GiveUserControlDotNet. It started to occur when I introduced dotnet, and I cannot exclude it since I need its functionality.
THANKS!
I am exporting my data to Excel using Excel Buffer.
When I write date using ex. EnterCell(21,13,FORMAT("Account Date"),FALSE,FALSE,FALSE,'dd/mm/yyyy',ExcelBuffer."Cell Type"::Text);
I can see in debugger that it grabs the correct value, but when Excel spreadsheet finally opens, it inserts some random date (in my case 25.11.1927.) which is insanity.
Does anyone know why this may happen?
If it helps, I use DotNet to format my Cell Size and GiveUserControlDotNet. It started to occur when I introduced dotnet, and I cannot exclude it since I need its functionality.
THANKS!
0
Answers
-
I think you need to format the cell in excel in the date format. I don't know if this is what user will appreciate doing extra work after the excel generates. But try this if user agrees. Hope this helps.0
-
Do you try Cell Type as ExcelBuffer."Cell Type"::Date?0
-
Hello
Thank you so much for your response.
@nedimyami Yes I have tried it but it still does not work.
@ishwarsharma016 Do you suggest that I go to Format Cells in Excel and set it to Date format, because this doesn't solve it either?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