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

前端 未结 7 1484
青春惊慌失措
青春惊慌失措 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:46

    Select the cells where the foramt should be changed:

    'Example:
    Columns("A:E").Select
    Selection.NumberFormat = "0.00" 
    Selection.NumberFormat = "0.0"
    Selection.NumberFormat = "0"
    
    'The exponential or scientific notation will be converted 
    

提交回复
热议问题