Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
smpa01
Super User
Super User

Excel.Workbook

Hi,

 

I have performed Excel.Workbook on a folder with a single excel file. However, whenever I expand Table to get the data I see 3 files which should not be the case. Because the Folder contains only one excel file. Why does it happen. Because of this my data gets duplicated on the query window.

 

How can I prevent it from happening.

 

Thank you in advance

 

Untitled.pngCapture100.PNGUntitled2000.png

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 ACCEPTED SOLUTION
Anonymous
Not applicable

I'm sorry, yes, I did not realized it, please remove all the lines on your editor and put it:

 

 

let
    Source = Excel.Workbook(File.Contents("C:\Users\ \Documents\PO Upload Automation\ OLD PO RESQUEST FORMAT\PO Request Landscaping 2017 - Ontario1.xlsx"), null, true)
in
    Source

 

 Please, check if the path and the file name is correct.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @smpa01, if I understand, you are duplicating your data on line two of your advanced editor. Remove the third and fourth lines, remove the last comma on your second line and the last line replace: #"Expanded Custom" by Source.

 

let
  Source = Folder.Files("C:\Users\  \Documents\PO Upload Automation\ OLD PO RESQUEST FORMAT")
in
  Source

Hope it helps!

 

Thanks for the response. I can't work out what you suggested - I understand, you are duplicating your data on line two of your advanced editor. Remove the third and fourth lines, remove the last comma on your second line and the last line replace: #"Expanded Custom".

 

Can you please write the complete code.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Anonymous
Not applicable

@smpa01, I have already written the code. 

 

Remove all the lines and just put it on your editor.

let
  Source = Folder.Files("C:\Users\  \Documents\PO Upload Automation\ OLD PO RESQUEST FORMAT")
in
  Source

 What is the output?

This does not help me get to the data which the excel contains.

 

I think Excel.Workbook is the code to specify the path for the folder contents which I used to get to the data.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Anonymous
Not applicable

I'm sorry, yes, I did not realized it, please remove all the lines on your editor and put it:

 

 

let
    Source = Excel.Workbook(File.Contents("C:\Users\ \Documents\PO Upload Automation\ OLD PO RESQUEST FORMAT\PO Request Landscaping 2017 - Ontario1.xlsx"), null, true)
in
    Source

 

 Please, check if the path and the file name is correct.

It Works !!! 🙂

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors