Power Query import of print area is causing duplicates

Monsignor

Board Regular
Joined
May 30, 2011
Messages
162
Is this new? I made queries 7 months ago and within the past 2 weeks I've been getting random duplicates.

The query brings in about 50 sheets worth of data, and there might be 1 or 2 that are duplicated. I just noticed this activity in the image below. The duplicate is happening on this file because Sheet1 is being imported as well as _xlnm.Print_Area.

When I go filter that print area out, everything is fine.

I don't know if I just missed something 7 months ago; if the workbook user did something; or if Microsoft changed something.

Any ideas where I can begin to look for what's different?


PQ-Import-print-area.png
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
It's probably that a user has set a Print Area and the print area didn't exist when you created the Query.

Assuming you are using Excel.Workbook?

There should be a column called [Kind] which you can use to filter on "Sheet"

Code:
let
    Source = Excel.Workbook(File.Contents("C:\Book1.xlsx"), null, true),
    #"Filtered Rows" = Table.SelectRows(Source, each [Kind] = "Sheet")
in
    #"Filtered Rows"
 
Upvote 0
Yup! That's exactly what happened.
Thanks for the tip. I'll incorporate this to prevent future time bombs.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,192
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top