Is there away on google sheets to paste text and automaticly create new rows with every line break or ect?

I will paste a lot of text by this format in the example below (700 lines in total):

wizard_setup_process_title;setup_wizard;1;1;Setup process;;true;
wizard_setup_process_description;setup_wizard;2;1;In just a few steps you will be setup and ready to go!;;true;
wizard_optimization_settings;setup_wizard;3;1;Optimisation settings;;true;
wizard_alt_tag_settings;setup_wizard;4;1;ALT Tag settings;;true;
wizard_payment_method;setup_wizard;5;1;Payment method;;true;

For now, I can only format columns by doing data->split text to columns, the semicolan at the end of a string seperates column, two semicolons leaves a column empty.

Is there any similiar way to split text to rows or ect?

Any help will be appreciated.

  • Usually Google Sheets does that automatically. How exactly are you pasting the data? Also, please add a brief description of your search/research efforts as is suggested in How to Ask
    – Rubén
    Nov 5 '20 at 13:40
  • I simply paste the text inside a rows first column. Nov 5 '20 at 13:48
  • Each line break in your raw text signals to Google Sheets that you want a new row. If you need to insert line the breaks, I would look into regular expressions. Nov 6 '20 at 18:30

There is no built-in function to automatically split pasted data into row but you can use a on edit simple or installable trigger from Google Apps Script.

The edit event object includes a range property that can be used to grab the pasted values. Then you could use JavaScript to split those values into rows and then use the Google Apps Script Spreadsheet Service to replace the pasted data by the splitted data.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.