Text to Table without spaces between words

I use Office 2010.
My question applies to Word and Excel.
I use an original pdf file, which converted to Word or Excel generates the tables below.
I want see 4 columns, to be able to remove automatically the space between words, so no copy/paste of words, split the cells individually and later paste the copied text. I do not want to arrange the table manually word by word. In Word I use also Insert-Table-Convert Text to Table.
How can I do that?
P-a-r-t-s----l-i-s-t.docx
Parts-List.xlsx
LVL 21
viki2000Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrahamSkanRetiredCommented:
1. Use a wildcard Find and Replace to convert the multiple spaces to tabs

Find what: [ ]{10,}:
Options:   Use Wildcards

Replace with: ^t

2. Use a non-wildcard  Find and Replace to remove the remaining spaces

3.  Select and convert the table to text

4. Convert the text back to a four-column table by separating at the tabs.

5, Type in the missing 't' and the now missing spaces in the heading rows: "Partslis" and "PartNumber"
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
viki2000Author Commented:
I will try that.
In mean time I have done something similar using Notepad++ and TextFX plugin:
https://www.cathrinewilhelmsen.net/2014/10/15/edit-columns-in-notepad-with-textfx-plugin/
https://www.youtube.com/watch?v=5cQ-1JnsW_g
0
viki2000Author Commented:
For unknown reason, it does not work with my Word file.
I have tried to learn how the wildcards work:
 https://support.office.com/en-us/article/find-and-replace-text-or-formatting-in-word-for-mac-ac12f262-e3cd-439a-88a0-f5a59875dcea

Did you try with my Word file to do what you proposed?
For example the colon : at the end of [ ]{10,}: does not work for me.
 I have tried without it, but still I do not get what I supposed to get. U understand your suggestions, because I have done something similar in Notepad++, but it does not work for me in Word 2010 with my file.
Could you try with my file your proposed steps?
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

GrahamSkanRetiredCommented:
Sorry for the delay. I've been out.

My apologies, too, for the mistype. The colon should not have been there at all.
0
viki2000Author Commented:
Still, I it does not work (easy) for me in Word.
How I have done it with Notepad++:
- Save Word as  *.txt and open the TXT file in Notepad++
- Select all text in Notepad++ and then with Replace I replaced space " " with semicolon ; in all text, so with Replace All
- With the Replace dialog opened I replaced ;; with ; repeatedly using Replace All until I got only one ; between words. Then I saved the txt file.
- Then I opened the TXT file in Excel with import Data, Delimited with ;
- Then I have done a final adjustment manually on some words.
0
aikimarkCommented:
1
viki2000Author Commented:
Your approach involves VBA, which I wanted to avoid this time, my files were not very complex, I was just lazy. For long and complex files worth to study your approach, anyway your article is well written.
I would rather prefer GrahamSkan method for not so long files. Anyway I have done it with Notepad++, but I wanted to see how is working also within Word functionality only.
0
viki2000Author Commented:
So, finally I had success with the solution proposed by GrahamSkan, but a bit modified.
I do not know why the {10,} does not work for me.
Maybe GrahamSkan can help me with his proposed {10,}.

This is how I have done it in Word using Replace based on GrahamSkan suggestions:
-      Find what: [ ]{2}
        Options:   Use Wildcards
        Replace with: ;
        At Find what is a space between parentheses.
-      Find what: [;]{2}
        Options:   Use Wildcards
        Replace with: ;
        Click Replace All several times until I got 0 replacements
-      Find what: [ ]{1}
        Options:   Use Wildcards
        Replace with:
        At Find what is a space between parentheses.
        At Replace with is nothing, I have deleted any character and even space is not there. In this way one space between 2 characters is deleted.
-      Then I corrected by hand some semicolons between some characters in case is needed.
-      Select the Table, then go Layout (Word 2010) and then Convert to text and with the option Separate the text with semicolon.
-      To delete empty lines:
        Find what: ^p^p
        Replace with: ^p
        Replace All
-      With the selected text we go Insert-Table-Convert Text to Table and at Options we choose Separate text at Semicolons.
-      Any other corrections that are needed can be done with Undo and Redo on the last operation with Convert Text to Table by correcting the space or semicolon between characters.
-      Done.
0
GrahamSkanRetiredCommented:
In wildcard finds, the square brackets contain a list of characters to find - only a space in this case. The curly brackets are used to say how many instances of any of those characters are to be found. The first figure (10 here) says 'at least this number'. The second (missing here) figure gives a maximum number, so the whole term translates as ten or more spaces to be found. With a tab character as the replacement text for the multiple space string, the text can be used in the reconversion back to a table.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.