Page Icon How To Merge and Split Rows in a CSV File - Rons Data Edit

To Merge Rows in a CSV File

A CSV Editor is the ideal application to merge or split rows in a CSV file; you can download Rons Data Edit, for free, right here: Download.

1. Open the Toolbox and go to the 'Merge Rows' Tool

Your CSV file can be opened using the 'Open Document' File menu, or 'Open Document' link on the Start Page of the application.

Merge Rows Part 1

In the ribbon bar, at the top of the main window, go to the 'Rows' tab, and click on the 'Row Tools' button. This action opens the 'Row Tools' panel. From the available tools displayed, select 'Merge Rows'.

Merge Rows Part 2

2. Set the appropriate 'Merge Rows' options

See below for the listing of the settings and their explanation.

Description

Options

Explanation

Tools Available Several tools are displayed. 'Merge Rows' should be selected.
Source Columns In the 'Source Colums' section all the columns of the document are listed and can be selected and transfered by clicking on the arrows to the next section ('Selected Columns').
Selected Columns

The 'Selected Columns' section displays the columns that are going to be merged together. The two Up and Down arrows on the left side allow to move the columns and give accordingly the proper merging order of the data.

Options

Merge Separator

Specific

If checked the cell text for any rows merged will be separated by the text in the text box below (for example a comma, a space, a dash etc.).

Tab

If checked the cell text for any rows merged will be separated by a Tab.

Line Break

If checked the cell text for any rows merged will be separated by a line break.

Note: that under the 'Single Line' viewing mode only one line will be displayed but the blue font colour indicates that there are more lines in the cell. To be able to see all the lines change the View mode to 'Multi Line' under the View tab in the ribbon bar.

Apply to

Whole Document

Changes will be applied to the entirety of the current document.

Selection

Changes will be applied to the selected cells in the current document.

Match Case If checked the case of the text will be used when comparing rows, otherwise case will be ignored.
Ignore space and symbols If checked non-text characters will be ignored when comparing rows.

In this example above (see pictures), the user would like to merge rows in order to group the data per states. The goal is to group the data and to create one row per state.

Therefore, the "State" column has been highlighted in "Source Column" and transferred to the "Selected Column" area by clicking on the ">" arrow. The "Merge Separator" has been selected in this case as "Line Break" and finally this action is requested for the "Whole Document".

Please note that the colour of the fonts of the rows that contain multiple lines will be blue. To see more than one line, the viewing can be changed to "Multi Line" under the "View" tab in the ribbon bar.

3. Apply the changes

Click the 'Merge Rows' button to apply the changes.

When satisfied with the changes, make sure to save the document by clicking on the 'Save' button the top left corner of the main window or by clicking the 'Save' button on the 'Home' tab of the ribbon bar.

Note: any action can easily be reverted by clicking on the 'Undo' button on the menu on the top left corner of the main window.

To Split Rows in a CSV File

1. Open the Toolbox and go to the 'Split Rows' Tool

Your CSV file can be opened using the 'Open Document' File menu, or 'Open Document' link on the Start Page of the application.

Split Rows Part 1

In the ribbon bar, at the top of the main window, go to the 'Rows' tab, and click on the 'Row Tools' button. This action opens the 'Row Tools' panel. From the available tools displayed, select 'Split Rows'.

Split Rows Part 2

2. Set the appropriate 'Split Rows' options

See below for the listing of the settings and their explanation.

Description

Options

Explanation

Tools Available Several tools are displayed. 'Split Rows' should be selected.
Split Row on
Split Column Column List Select the column where the splitting of the data will result into the creation of a new row.
Split on Text When selected, the text can be typed in the dedicated field below. As a consequence the row(s) will be split at the level of the typed in text when detected. That text won't be included in the new row(s).
Regular Expression When selected, the regular expression can be typed in the dedicated field below and it will determine the area where the split will occur.
Tab When selected, the row(s) will be split at the level of Tab separations.
Line Break When selected, the row(s) will be split at the level of Line Break separations.
Options
New Row Action

Copy Source Row

When checked the content of the source row will be copied.

Leave Empty When checked the content of the source row won't be copied so the cells will be empty.
Apply to

Whole Document

Changes will be applied to the entirety of the current document.

Selection

Changes will be applied to the selected cells in the current document.

In this example above (see pictures), the user would like to split rows using the address information of the Address column. The goal is to create a new row for each data of the Address column that is separated by a line break and to keep the rest of the row with the same data as the original one.

Therefore, the row is split at the level of the "Address" column, is split on Line Break, copying the Source Row data so that the rest of the data remains identical to the original row, and finally this action is requested on the Whole Document.

3. Apply the changes

Click the 'Split Rows' button to apply the changes.

When satisfied with the changes, make sure to save the document by clicking on the 'Save' button the top left corner of the main window or by clicking the 'Save' button on the 'Home' tab of the ribbon bar.

Finally

Do you have a question, or some feedback? We'd love to hear from you! Send us, Rons Place Software, a message using our Contact Form and we will get back to you shortly.


Tags: Rons Data Edit
Our Products
Rons Data Edit Icon

Rons Data Edit - Professional CSV Editor

Learn more

Rons Data Stream Icon

Rons Data Stream - Batch CSV Processor

Learn more

Rons Data Tools Icon

Rons Data Tools - Free CSV Tools

Learn more

Rons WebLynx Icon

Rons WebLynx - Desktop Bookmark Manager

Learn more

Rons CSV Editor Icon

Rons CSV Editor - now Rons Data Edit

Learn more

Rons Renamer Icon

Rons Renamer - Powerful Batch File Renamer

Learn more