Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Powr Query cannot open an XLSX file

Hi   I have a XLSX file (generated by another non-Microsoft application)  I can open with Excel but if I go to open the same file via the Power Query - Data -> Get Data - From a File -> From Workbo...
  • v-yanjiang-msft's avatar
    4 years ago

    Hi Anonymous ,

    I'm afraid it's the easiest way. Usually if Excel file was generated by third-party tool. Such tool could generate quite limited XML schema which is enough to open the file in Excel and to work with it, but not enough for Power BI connector. As an example, trace log shows

    [DataFormat.Error] The input couldn't be recognized as a valid Excel document.\r\nStackTrace:\n…
    …
    [DataFormat.Error] We couldn't find a part named '/xl/sharedStrings.xml' in the Excel package.\r\nStackTrace:\n…

    It's enough to open the file in Excel and save it (without any changes) – Excel is clever enough to fix the schema. For the routine regular tasks we use poweshell script which does exactly the same in background.

     

    Reference:  "The input couldn't be recognized as a valid Excel document." - Microsoft Tech Community

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.