Google-sheets – way on google sheets to paste text and automaticly create new rows with every line break or etc

google sheetsgoogle-sheets-arrayformulagoogle-sheets-query

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.

Best Answer

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.

Resources