web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Leading zero in export to excel

(0) ShareShare
ReportReport
Posted on by 2,390

I am not getting leading zero while exporting data to excel using export to excel code . I have tried adding '''' with data but a character ' comes at the beginning.

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    hi,

    did you also used FORMAT(Number) i mean string to export := ''''+FORMAT(YourData)

    using the right syntax msdn.microsoft.com/.../dd301367(v=nav.80).aspx

  • Suggested answer
    Binesh Profile Picture
    7,885 on at

    Hello,

    Put CellType as Text or @ while in export code.

  • Suggested answer
    Alex A Profile Picture
    2,913 on at

    Hello, you need to highlight the columns in Excel and change the data type /number format. Set a Number format for numerical values, and set a Text format for all alphanumeric characters.

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    Check the format function 

  • Andrea Antoniazzi Profile Picture
    285 on at

    Hi NavTech,

    if you are using the Excel Buffer you can insert '@' in the NumberFormat field. For the decimal values you can insert '#,##0.00'

  • Suggested answer
    Tharanga Chandrasekara Profile Picture
    23,118 on at

    You need to add four single quotes ('''') for the field which you want excel to format as text not as integer.

    Check below blog from Saurav : http://saurav-nav.blogspot.co.nz/2012/06/nav-report-export-to-excel-number-as.html

  • Tharanga Chandrasekara Profile Picture
    23,118 on at

    Were we able to help you to resolve the issue?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans