MetricSign
EN|NLRequest Access
Medium severitydata flow

Power BI Refresh Error:
DF-Excel-InvalidDataType

What does this error mean?

A column in the Excel source contains a data type that ADF's Mapping Data Flow cannot process — for example, a cell formatted as a complex object, an unsupported Excel type, or a value that cannot be cast to the expected target type.

Common causes

  • 1An Excel cell contains a formula error value (#N/A, #REF!, #VALUE!) that ADF treats as an unsupported type
  • 2A column is mapped to a data type in the data flow schema that is incompatible with the actual cell value (e.g. a text cell mapped to integer)
  • 3The Excel file contains mixed types in a single column — some rows are numbers, others are text — and the detected schema doesn't match all rows

How to fix it

  1. 1Open the Excel source file and check the columns for formula errors (#N/A, #REF!, #VALUE!) — replace or remove these before processing.
  2. 2In the data flow, click the Excel source and go to the 'Projection' tab — check the data type assigned to the failing column.
  3. 3Change the column type to String in the source projection, then use a Derived Column transformation downstream to cast it to the intended type with error handling.
  4. 4Enable Debug mode and run a data preview on the Excel source — rows with type errors will fail and show the problematic values.
  5. 5If the Excel file is generated by another system, update the generating process to output consistent, clean data types.

Frequently asked questions

Does this error affect all rows or only the rows with the bad value?

The error fails the entire data flow activity. If you need to continue on error, configure the source's 'Error row handling' setting to skip rows with errors.

Can I cast everything to String first to avoid type errors?

Yes — setting the source projection to String avoids this error at the source level. Use Derived Column transformations to cast to correct types downstream, with explicit null handling.

Why does this error only appear with certain Excel files but not others?

Different Excel files may have different cell formats for the same column — one file uses numbers while another uses text-formatted cells. ADF infers schema from the first file; subsequent files may not match.

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

Other data flow errors