MetricSign
EN|NLRequest Access
Medium severitydata flow

Power BI Refresh Error:
DF-Excel-InvalidFile

What does this error mean?

The ADF Mapping Data Flow Excel connector cannot read the target file — either because the file is not a valid Excel workbook format (.xlsx or .xls), the file is corrupt or password-protected, or the file path points to a non-Excel file.

Common causes

  • 1The file has a .xlsx or .xls extension but is not an Excel workbook — for example, it is a CSV or HTML file that was renamed
  • 2The Excel file is password-protected — ADF cannot read encrypted workbooks
  • 3The file was partially written or corrupted during upload and is not a valid ZIP archive (the .xlsx format is a ZIP container)

How to fix it

  1. 1Open the file locally in Excel and confirm it opens without errors — if it fails to open, it is corrupt.
  2. 2Check whether the file has a password by attempting to open it: if Excel prompts for a password, remove the protection before moving the file to ADF's source location.
  3. 3Verify the file format: open the linked service dataset and confirm the format is set to 'Excel', and that the file extension matches the actual format.
  4. 4Re-upload the file to storage and run the data flow again — if the file was partially uploaded, a fresh upload should resolve it.
  5. 5Enable Debug mode and run a data preview on the Excel source to confirm ADF can read the file.

Frequently asked questions

Can ADF read password-protected Excel files?

No — ADF Mapping Data Flows cannot decrypt password-protected Excel workbooks. Remove password protection before using the file as a source.

How do I check if an Excel file is corrupt?

Try opening the file locally in Excel. If Excel reports a repair or recovery message, or cannot open it at all, the file is corrupt — obtain a fresh copy from the source system.

What happens if someone saves a CSV as a .xlsx file — will ADF detect that?

ADF fails with InvalidFile because the content doesn't match Excel format even though the extension is .xlsx. The .xlsx format is a ZIP container with XML inside — a renamed CSV is not.

Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-troubleshoot-guide

Other data flow errors