Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
In Microsoft Fabric I have build a Data Pipeline that uses a Copy Activity to read an Excel in my DataLakehouse ( I have uploaded it there)
But the Copy Activity doesn't reliably infer or recongize data types, especially when going through formats like Parquet or Excel in between.
I mean I have a column that basically has a numbering between 1 and 5000 and it assumes its a string. It assumes all of my columns are strings.
Is there a solution to this ?
Solved! Go to Solution.
Hi @Fabroulous ,
Thank you for reaching out to us on Microsoft Fabric Community Forum!
Excel files may be tricky when used with Copy Activity in Microsoft Fabric. Even when a column clearly has numbers, Fabric might treat it as text due to how Excel handles formatting. There are a few ways to fix this and ensure your data types are set correctly:
Refer the document here for more understanding:
https://learn.microsoft.com/en-us/fabric/data-factory/format-excel
https://learn.microsoft.com/en-us/fabric/data-factory/data-type-mapping
If this resolved your query,consider accepting it as solution.
Regards,
Pallavi.
Hi @Fabroulous ,
I wanted to follow up on our previous suggestions regarding the issue you are facing. We would like to hear back from you to ensure we can assist you further. If our response has addressed your query, please accept it as a solution and give a ‘Kudos’ so other members can easily find it.
Thank you.
Excel doesn’t store explicit data types. A cell might look like a number, but unless all values in the column conform, the ingestion engine plays it safe. Type inference is schema-on-read and based on a sample of rows (often the first N rows), so a few string-like entries (e.g., a blank cell or a header row that wasn't skipped) can cause the entire column to be inferred as a string.
Option 1: Schema Definition via Mapping in Copy Activity
Use the "Mapping" tab inside the Copy Activity to manually define the column types. Here’s how:
Option 2: Preprocess the Data via Dataflow or Notebook
If the Copy Activity mapping is too rigid, consider adding a Dataflow Gen2 or a notebook (Spark or PySpark) step before ingestion:
Option 3: Convert Excel to CSV Before Upload
Please mark this post as solution if it helps you. Appreciate Kudos.
Hi @Fabroulous ,
Thank you for reaching out to us on Microsoft Fabric Community Forum!
Excel files may be tricky when used with Copy Activity in Microsoft Fabric. Even when a column clearly has numbers, Fabric might treat it as text due to how Excel handles formatting. There are a few ways to fix this and ensure your data types are set correctly:
Refer the document here for more understanding:
https://learn.microsoft.com/en-us/fabric/data-factory/format-excel
https://learn.microsoft.com/en-us/fabric/data-factory/data-type-mapping
If this resolved your query,consider accepting it as solution.
Regards,
Pallavi.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Fabric update to learn about new features.