Dataport values with preceeding zeroes

srij
srij Member Posts: 10
HI All
I need to export out numbers using dataport , with preceeding zeroes like 00000502, 00000987 etc to csv / excel file. The date type of the exported data is code

Now after I export all the precceding zeroes are gone...in the csv am viewing as 502,987 etc...HOw to export out the datas witl all preceeding zeroes..
Using Nav 5.0

Awaits all your help

Comments

  • syedamir
    syedamir Member Posts: 68
    After Saving the File as CSV, do not Open the CSV File...just Import it...

    Regards,
    Syed Amir
  • kitik
    kitik Member Posts: 230
    You don't see the zeros if you open the csv file with Excel. Is Excel who is "deleting" the zeros.
    Tell Excel that the colum contains Text, insted of integer.

    Salut!
    Laura Nicolàs
    Author of the book Implementing Dynamics NAV 2013
    Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.
  • srij
    srij Member Posts: 10
    Thanks kitik for the reply
    How to export out to excel which is preformatted , ie, like colum B is text format...
  • AntidotE
    AntidotE Member Posts: 61
    You could format output with leading "'"
    Excel understands '00011 as text 00011 and displays it without deleting leading zeroes... but importing such stuff from csv would require different approach.
    It is hard to swim against self bloodstream... (c) Old, experienced kamikadze.
  • srij
    srij Member Posts: 10
    thanks will try