How to import long number from csv to excel without converting to scientific notation in VBA

前端 未结 7 1502
青春惊慌失措
青春惊慌失措 2021-02-05 10:07

I opened semicolon delimited txt file with this code below and long account number showed up as scientific notation after saving to excel regardless of formatting to text that c

相关标签:
7条回答
  • 2021-02-05 10:47

    I was importing products into an excel file and the barcodes would come up as a scientific notation (eg 5.4265E+12)

    This meant when I converted the file into a csv file to upload the details, the csv wasn't reading the barcodes properly and changing them to 52862300000 etc.

    To combat it:

    • Open as an excel sheet (or convert if you can't open as one)
    • highlight the (barcode/scientific notation) column
    • Go into Data / text to columns
    • Page 1: Check 'Delimited' / Next
    • Page 2: Check ' Tab' and change 'Text Qualifier' to " / Next
    • Page 3: Check 'Text' rather than 'general'
    • Finish

    This should convert them all to display as the long number. You can then save it as a CSV file and the numbers won't be converted/formatted into scientific numbers.

    Hope this helps!!

    0 讨论(0)
提交回复
热议问题