Aug 16 2023 01:05 AM - edited Aug 16 2023 01:09 AM
So I have data taken from a website and want to process it using Excel but I only have a .txt file. Here is the data like this. I've tried using the WRAPPROWS function but that doesn't work. Any suggestion? There is a condition where specific rows are empty, this makes other data messy.
Aug 16 2023 02:18 AM
Aug 18 2023 01:04 AM
Aug 18 2023 01:49 AM
Aug 25 2023 04:50 AM
Solution
Challenge is sometimes a Problem record consists of 6 rows, sometimes 7
In attached file a Power Query approach. In the Source step replace the file path (line File.Contents) to the text file with yours:
Source = Csv.Document(
File.Contents("X:\Abc\Def\ProblemsSample.txt"),
[Delimiter="#(lf)", Columns=1, QuoteStyle=QuoteStyle.None]
)
Aug 27 2023 08:43 PM
Sep 03 2023 08:35 PM - edited Sep 04 2023 02:51 AM
I have an additional question, what if the data has one additional column? I tried to change the existing script, but it gave an error. Can you help me?
Sep 08 2023 01:20 AM
Attached query seems good... Don't forget to update line File.Contents in the Source step
Aug 25 2023 04:50 AM
Solution
Challenge is sometimes a Problem record consists of 6 rows, sometimes 7
In attached file a Power Query approach. In the Source step replace the file path (line File.Contents) to the text file with yours:
Source = Csv.Document(
File.Contents("X:\Abc\Def\ProblemsSample.txt"),
[Delimiter="#(lf)", Columns=1, QuoteStyle=QuoteStyle.None]
)