Skip to main content
Known Participant
March 9, 2014
Question

Convert table, insert headers before cell content

  • March 9, 2014
  • 1 reply
  • 744 views

Hello all,

Let's say I have a big table and I want to convert it into text, but I need to insert the corresponding column heading before each cell content. For example, a simple 2x2 table with a header must be converted like this

Column 1 Header

Row 1 Cell 1 Content

Column 2 Header

Row 1 Cell 2 Content

Column 1 Header

Row 2 Cell 1 Content

Column 2 Header

Row 2 Cell 2 Content

Is it possible to do this through a script?

Many thanks!

This topic has been closed for replies.

1 reply

Obi-wan Kenobi
Legend
March 9, 2014

Hi,

Can you give us an example with real text. I do not think you need a script...

tudor-vAuthor
Known Participant
March 9, 2014

Here is an example of a table and how I want to convert it.

Obi-wan Kenobi
Legend
March 9, 2014

Ok!

So, Transform the header rows in current rows. Add a column before the actual column 1 (we have now 3 columns) and add a column between the column 2 and 3 (we have now 4 columns). Copy the row "Header 1" in all the rows of the column 1 and the row "Header 2" in all the rows of the column 3. Then convert the table in Text.

Just finish by a grep research: search Tab and replace by \r.