Let’s say I have a tab-delimited file, and the contents are:
Harry Jones Springfield
Fred Smith Boston
John Leary Springfield
I want to read this file and stick the contents in a table with the columns firstName:, lastName:, city:
I know how to create datasources and tables, but I can’t figure out how to get the data from the file into the right format so I can use the “append” command. The way I do it now is with a loop to set the values of each field - but it’s way to slow.
ie:
repeat with i in theList
set rowOne to make new data row at the end of data rows of filenameDatasource
set contents of data cell “First Name” of rowOne to firstName
set contents of data cell “Last Name” of rowOne to lastName
set contents of data cell “City” of rowOne to theCity
end repeat
Can anyone help?