Using the provided EXCEL API is very convenient as it avoids handcoding of file opening etc.
However, what I find inconvenient (perhaps some other people, too) is the provided mechanism with callbacks whenever a new line is consumed. For me a program is much easier to write and understand if the control flow is concentrated in one place (usually the script main function) so that I can see what the script does without jumping in the listing.
So I would really appreciate an alternative solution which provides a list or array over which I can iterate, in the style of:
// assumming that the file open dialog has already happened...
lines = myExcelFileHandle.readFile() // return value is an array of lines. This function could perhaps come with additional attributes, e.g. to read or skip the first line...
for(var i=0;i < lines.length;i++) { // also other style of iteration could be possible...
id=lines[i][ID_COLUMN];
asil=lines[i][ASIL_COLUMN]; // etc. (of course, assuming that the column names have been defined before)
}
Would something like this be possible?