I wrote this function to split a particular column.
function SplitColumnValues(sheet_name, column_index, delimiter) {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheet = spreadsheet.getSheetByName(sheet_name);
var lastRow = sheet.getLastRow();
var range = sheet.getRange(1,column_index,lastRow-1, 1);
range.splitTextToColumns(delimiter);
}
The function takes sheet name, Column that you want to split and delimiter.
First, get the reference sheet
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheet = spreadsheet.getSheetByName(sheet_name);
next line will get the number of rows that are in the column that needs to be split
var lastRow = sheet.getLastRow();
next get the range(i.e. the column that needs to be split) and then split that range using 'splitTextToColumn'
var range = sheet.getRange(1,column_index,lastRow-1, 1);
range.splitTextToColumns(delimiter);