Retain leading 0''s in csv file..

  • I use csv to do all my imports, (I frequently have issues when trying to import from Excel sheets), and as you all probably know, leading 0's are removed. I have several codes I need to impotr with leading 0's.

     

    ie. '0923843' in the original Excel file...

    becomes

    '923843' when saved as a csv file.

     

    Does anyone know of any escape sequence or something I can try to retain the leading 0's? I have tried double quoting the value then saving as csv- but the quotes show up in the csv. Formatting as 'text' in Excel before saving it to csv doesn;t work either.

    Any and all help, suggestion, criticism, is appreciated.

     

    Thanks to the solution-holder in advance,

    Colin

  • Hello Colin,

    Can you check up by entering the value as '0000123' in the excel cell. Finally it shows up as 0000123'.

    Thanks and have a nice day!!!


    Lucky

  • Thank you for the response. is there a way to remove even the trailing '- quote?

    Thanks,

     

    colin

  • You just need to set the field as text.

  • I tried that several times already (tried formatting as text in Excel then saving as csv, tried formatting as text within the Excel csv- neither worked).

     

    Thanks though, I appreciate all help on this.

     

    -colin

  • In Excel, if you have a single quote in front of the data, then it leaves the data alone.  This should work.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply