Forum Discussion
Columns missing from imported Excel data
Hi Jimmy801,
It's reassuring to hear that I'm not the only person having this issue and appreciate you taking the time to respond.
I've done some more research on UsedRange but I haven't worked out how to apply this in my particular case. Is there an adjustment to be made within Power BI's Advanced Editor or do I have to do this at the Excel side? If it's the former would be able to provide an example using my sample code?
hello
this hasn't to do anything wtih power query
this is only a matter of settings in Excel.
The USEDRANGE is a read-only object that is determed by excel, if a range is used.
I will write you a VBA code to read this object. You can paste this to your files and check whether a the usedranges are the same. In addition is always dangerous to use an non dynamically approach when working with an unstructered data like Excel Table.RemoveColumns(Table, {"Column16"}) can lead to an unexpected result, as Column16 may not exist or not contain the data you are expecting (as you saw in your example, the usedranges may not be identically, even you have designed it like that - maybe used changed something)
Here now the VBA code to check
sub checkUsedRange ()
dim ws as worksheet
for each ws in thisworkbook.worksheets
debug.print ws.name & " - " & ws.usedrange.address
next ws
end sub
have fun
Jimmy
- NJS03036 years agoFrequent Visitor
That's fantastic Jimmy801, thanks for taking the time to do that.
I've checked the UsedRange of my example spreadsheet and it's reporting A1:D18822 which is correct but Power BI is essentially importing A1:C18822. I'm beginning to suspect that this is being caused by the SharePoint folder connector as when I import the same spreadsheet using the standard Excel connector A:D I'm not having the missing column issue.
- Jimmy8016 years ago
Community Champion
Hello
could you please post the file and the M-code
Thanks
Jimmy
- Jimmy8016 years ago
Community Champion
Hello NJS0303
what about your problem?
If my posts did help your or solved your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun
Jimmy- NJS03036 years agoFrequent Visitor
Hi Jimmy801
Sorry (again) for the delay in responding.
I've finally been able to identify what is causing the issue, namely there's a known issued with the SAP Web Intelligence .xlsx reports in terms of how Power BI reads them:
https://apps.support.sap.com/sap/support/knowledge/preview/en/2853508
I don't have full access to SAP's knowledge base so I'm operating with limited information at the moment. I'll try and find out more but I'm hoping someone reading this has access to the knowledge base and can share the full article.