Forum Discussion
How to handle multi-row tables in Power Query when converting from PDF to Excel
So I'm importing some contact information from a pdf, but Excel imports some of the addresses as multiple rows, and I'm not quite sure how to go about that. I originally was going to fill down with the names and then group it all, but as you can see in the image, the address is broken up into multiple rows both below and above the main row of information, so I can't fill down accurately. How should I approach combining these rows?
https://docs.microsoft.com/en-us/answers/storage/attachments/227845-ejemplo.png
2 Replies
- lbendlinSuper User
Read about "quoted line breaks" - that is the way to keep stuff together that belongs together, rather than breaking it into rows.
Please provide a sanitized sample of your source file.
- jbwtpMemorable Member
Hi cadet1249,
Interesting problem to hae :). Unless you can do something with the pdf export settings, my suggestion would be to create a list of possible "last line" - assuming all addresses are in the same format (like in US it could be something like this, which makes all addresses ending with United States of America):
or in your case it can be a list of something like "Metropolitana 00", "Santiago 33", etc.
And then split the table basedon the "last lines" list. This is quite CPU consuming, but may work if you have any consistency in the adress format.
Kind regards,
John