/* reset file pointer to start of file so we overwrite it */ 'del 'file charout(file,'',1)
/* we now have the range, iterate over it */ do curLayer = ulLayer to lrLayer
do curRow = ulRow to lrRow
do curCol = ulCol to lrCol
value = getv(cell(curRow,curCol,curLayer))
charout(file,value,)
if \(curCol = lrCol) then
charout(file,',',)
end
lineout(file,'',)
end end
/* Close the stream so we can add the extended attribute */ type = 'Plain Text' typeinfo = "DFFF00000100FDFF"x || d2c(length(type)) || "00"x || type || "0"x stream(file,'c','close') SysPutEA(file,'.TYPE',typeinfo) /* we're done! */ exit
/* convert a STRING representation of the layer or column */ /* (example: AX) to a numeric offset */ toOffset:
parse arg instr
ret = length(instr)
select
when ret = 1 then
ret = C2D(instr)-C2D("A")+1
when ret = 2 then do
ret = C2D(right(instr,1))-C2D("A")+1
ret = ret + (C2D(left(instr,1))-C2D("A")+1)*26
end
when ret = 3 then do
ret = C2D(right(instr,1))-C2D("A")+1
ret = ret + (C2D(left(instr,1))-C2D("A")+1)*26
ret = ret + (C2D(substr(instr,2,1))-C2D("A")+1)*26*26