Forum Discussion
mmpbi
5 years agoRegular Visitor
Duplicate column in the rowset error when appending files
I wrote the folowing power-query script. It calls fnGetContents, which is a custom func that removes the first 8 lines of every file (since they contain all sorts of crap I don't need). Then it expan...
Jimmy801
5 years agoCommunity Champion
Hello mmpbi
can you try this function please
= (filepath)=>
let
Source = Csv.Document(File.Contents((filepath)),[Delimiter=";", Encoding=65001, QuoteStyle=QuoteStyle.None]),
#"Removed Top Rows" = Table.Skip(Source ,8),
#"Promoted Headers" = Table.PromoteHeaders(#"Removed Top Rows", [PromoteAllScalars=true])
in
#"Promoted Headers"
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
mmpbi
5 years agoRegular Visitor
Thanks. Tried it. Unfortunately it only changed the error message:
- Jimmy8015 years agoCommunity Champion
Hello mmpbi
then I really don't know. I've checked your code and it's working like a charm. What you can still try though is to cancel your permissions. Go to data source settings and cancel all auhorizations.
Hope that helps
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy