CSV will convert text to number when you open it. But the leading zero are still there if you open them in notepad.
Applying Power Query to Keep the Leading Zeros
- Firstly, go to the Datatab from the Ribbon.
- After that, select From Text/CSVoption from Get & Transform Datagroup.
- Now, navigate to yourCSVfile and select it.
- Following that, click on Import.
- Firstly, click on Transform Data.
Afterward, a Power Query Editorwindow will be open on your worksheet as shown in the image given below.
- Now, click on the marked area in the Column1.
- After that, select the Textoption from the drop-down.
- Subsequently, a dialogue box will open and choose Replace Current.
- At this stage, you will be able to see that zeros in that****column are back as shown in the following image.