As far as I know, there should be no such function in WORD, but you can use a slightly stupid method to see if you can achieve the desired effect. As follows: After copying all the contents into one line, select the table, click the table properties-> option, and set the spacing to zero.
Then select all the words in the cell and underline them. Do you think it's okay to make adjustments in some unsatisfactory places?