Forum Discussion

ferfer1900's avatar
ferfer1900
Copper Contributor
Feb 22, 2022

Power query doesn't load all columns

Hello,

 

I'm trying to import a TCD from file 1 to file 2 using Power Qwery to automate it but when I laod the data the new table doesn't have all the colum from the first file. I don't understant what is the isue (I load 10/20 colum).

 

Thanks in advance for your help

 

Kind regard

4 Replies

  • TheChrisLewis's avatar
    TheChrisLewis
    Copper Contributor

    Try Excel.Workbook(File.Contents("C:\MyExcelFile.xlsx"), [InferSheetDimensions = true])

  • Lorenzo's avatar
    Lorenzo
    Silver Contributor

    Hi ferfer1900 

     

    It's highly probable the names/number of columns is hard-coded in your query. For example, if you setup your query with a (source) table of 10 columns and the new (source) table consists or 15 columns, if your query doesn't dynamically manage the names/number of columns, only the 1st 10 columns are taken into account

     

    If you need more help with this please post the code of your query 

    • ferfer1900's avatar
      ferfer1900
      Copper Contributor

      Lorenzo thanks to your concerne 

       

      I don't have a true request because I use the excel process "importation of data from excel files" should be able to load all my TCD and like you can see it's load until september but my TCD finish in jully 23. Not sure if it's more clear for your understanding.

      Kind regard

       

      • Lorenzo's avatar
        Lorenzo
        Silver Contributor

        ferfer1900 

         

        I better see what you mean. Be aware that the Power Query Navigator (Navigateur for you) window only shows a preview of the sheet/table you select and that preview can be truncated for performances reason

         

        So, what happens if you select "TCD Produit" in the Navigateur window and click on "Transformer les données" (at the bottom of the window), do you see all your columns in the Power Query Editor?

Resources