Forum Discussion
GabrielFLima
2 years agoFrequent Visitor
Power Query Editor retrieves data from excel inconsistently, making it useless
I encountered a problem while importing data using the Power Query Editor and coultn't find anything even parcially related while searching for solutions: I receive an Excel spreadsheet daily to m...
danextian
2 years agoSuper User
That is a curious and confusing thing. Is it the same file you shared? Can you share you M code?
GabrielFLima
2 years agoFrequent Visitor
Yeah, it's absolutely the same file, and now it's back to how it was originally...
Here's the (very simple) M code I used to test the sample, which started working as intended and today came back to the problem:
let
Fonte = Excel.Workbook(File.Contents("C:\Users\...\sample.xlsb"), null, true),
SAMPLE1 = Fonte{[Name="SAMPLE"]}[Data],
#"CabeƧalhos Promovidos" = Table.PromoteHeaders(SAMPLE1, [PromoteAllScalars=true]),
#"Tipo Alterado" = Table.TransformColumnTypes(#"CabeƧalhos Promovidos",{{"Name", type text}, {"Month", Int64.Type}, {"Date", Int64.Type}, {"Num Hours", type number}})
in
#"Tipo Alterado"