[Solved] Merge multiple txt files in Excel power query [closed]

Final try on this one Use Home…advanced editor… and paste this function into PowerQuery. Name it: fnReadFile (zFile)=> let Source = Csv.Document(File.Contents(zFile),[Delimiter=”#(tab)”, Columns=1, Encoding=1252, QuoteStyle=QuoteStyle.None]), #”Added Index” = Table.AddIndexColumn(Source, “Index”, 0, 1), // Date row includes text “Date: ” DateFind = Text.Replace(Table.FindText(#”Added Index” , “Date”){0}[Column1],”Date: “,””), // Row preceeding data includes text “>>>” CaratFind = … Read more

[Solved] Export Power Queries from One Workbook to Another with VBA

I was able to solve it by using the Workbook.Query object. here is my solution. Public Sub FunctionToTest_ForStackOverflow() ‘ Doug.Long Dim wb As Workbook ‘ create empty workbook Set NewBook = Workbooks.Add Set wb = NewBook ‘ copy queries CopyPowerQueries ThisWorkbook, wb, True End Sub Public Sub CopyPowerQueries(wb1 As Workbook, wb2 As Workbook, Optional ByVal … Read more