Is there any way to find the number of columns in a data window?
Here is a routine that can be used to do this. It uses the first row of data in determining the number of columns. If any cells in the first row are blank, they are not counted.
set datalist to result
copy every paragraph of datalist to temp1
copy item 1 of temp1 to temp2
set number_of_columns to (number of words in temp2)