Fix the width of excel cell


Is there a way to fix the width of the cell in excel?


  1. I create a report that get the template in Excel file.

  2. Use the template to populate the data base on the excel template.

  3. But when send all the data to excel it, ruined the template because the cell is expanding, so I want to make it a fix width even i throw a data to the template.

Im using NAV 5 sp1 and I use the report 7113 Export Analysis Rep. to Excel as a reference and uses a Excel buffer table. Any advise will help, Hoping for your reply


hi all,

i am new for this nav field,i created report,i have defined one Boolean field if this Boolean field is true this report should be exported into excel sheet.can any one help me what exactly code needs to be return for this.

thank you


For Fixing the width u can use Width function of excel automation/buffer.

For your question it is possible to export the report in excel when user boolean field is true .You can write the code as follows.

If Exceloutput then begin

Your excel code here