Use Excel's Get & Transform (Power Query) experience to format individual columns as text when you import data. In this case, we're importing a text file

  1. Click the Data tab, then From Text/CSV next to the Get Data button. If you don’t see the Get Data button, go to New Query > From File > From Text and browse to your text file, then press Import.

  2. Excel will load your data into a preview pane. Press Edit in the preview pane to load the Query Editor.

  3. If any columns need to be converted to text, select the column to convert by clicking on the column header, then go to Home > Transform > Data Type > select Text.

    Power Query - Data after converting to text

    Tip: You can select multiple columns with Ctrl+Left-Click.

  4. Next, click Replace Current in the Change Column Type dialog, and Excel will convert the selected columns to text.

    Get & Transform > Convert data to text
  5. When you're done, Click Close & Load, and Excel will return the query data to your worksheet.

  6. Version 10, Import data, select your xlsx document and follow the prompts, the leading zeros should be preserved.