>Hi Terry,
>
>My problem was that I was using the Y coordinate and X coordinate of CELLS to read the data into my spreadsheet since the data is not just simply the table structure.
>
>I really needed to work out what the reference of the cell was, eg. CELL(1,1)=A1
>
>the problem was that I sometimes have more than 26 columns, in the end I wrote a piece of code to convert a reference Y,X to a letter and number, and used this in the appropriate SUM command.
>
>Thanks for your help.
>
>RC
Robin,
Original post seems to be answered by Yuri.
Is this what you mean :
FUNCTION _GetChar
LPARAMETERS tnColumn
IF tnColumn = 0
RETURN ""
ENDIF
IF tnColumn <= 26
RETURN chr(asc("A")-1+tnColumn)
ELSE
RETURN _GetChar(int(iif(tnColumn % 26 = 0,tnColumn - 1, tnColumn) / 26)) + ;
_GetChar((tnColumn-1)%26+1)
ENDIF
Cetin