When exported to excel template, template layout changes?!

Tiwaz
Member Posts: 98
Hi guys.
I created processing only report that exports my document to excel template (attachment "1.xls"). But when it exporst, it completely changes my template (atachment "2.xls").
Not only does it spread this excel file to 2 pages in excel, but it also removes borders and field coulouring. Latter 2 i do not mind so much, but I would like it to stop spreading my template to 2 pages.
Does anyone know what can cause this?
THANKS!!
I created processing only report that exports my document to excel template (attachment "1.xls"). But when it exporst, it completely changes my template (atachment "2.xls").
Not only does it spread this excel file to 2 pages in excel, but it also removes borders and field coulouring. Latter 2 i do not mind so much, but I would like it to stop spreading my template to 2 pages.
Does anyone know what can cause this?
THANKS!!

0
Best Answer
-
Difficult to say without seeing any of your code or knowing what version of Excel Buffer you are using.
Search for XlWrkShtWriter in Table 370, if you have this then you can use the XlWrkShtWriter.SetColumnWidth method to resize the 1st column.5
Answers
-
It looks like it's caused by the descriptions in the first column. In your original file the descriptions "overflow" across several columns whereas in the second file the first column is expanded to allow the full description to fill it.
You could try merging the columns in the original file where you have long descriptions, this will probably stop the column being expanded.1 -
Hm, yeah, you are right. I have merged all of those cells but it still did not help. Is there a way to create a function, or alter my function EnterCell() in a way not to allow any formating or moving of columns?0
-
Difficult to say without seeing any of your code or knowing what version of Excel Buffer you are using.
Search for XlWrkShtWriter in Table 370, if you have this then you can use the XlWrkShtWriter.SetColumnWidth method to resize the 1st column.5
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