Andrew,
I had to make some alterations as the Array contains different data types.
This does works - however it is a little slow. The array holds 51 Columns and 365 rows - basically information about every half hour of the day. I cannot normalise the data as I am pulling it in through ODBC from an oracle datasource and I need to find the maximum value for any 1 half hour and the date and time this occurs. So I am dumping it into excel. Does anyone have any better ideas on how to speed this up - although I can live with this solution.
SELECT * FROM importsts INTO ARRAY arrpasstoexcel
* Create a string of the array
local cStringtoExcel, nRow2, nColumn2
cStringtoExcel = ''
FOR nRow2 = 1 TO ALEN(arrpasstoexcel, 1)
FOR nColumn2 = 1 TO ALEN(arrpasstoexcel, 2)
DO CASE
CASE TYPE('arrpasstoexcel[nRow2, nColumn2]') = 'D'
cStringtoExcel = cStringtoExcel + TAB + DTOC(arrpasstoexcel[nRow2, nColumn2])
CASE TYPE('arrpasstoexcel[nRow2, nColumn2]') = 'N'
cStringtoExcel = cStringtoExcel + TAB + STR(arrpasstoexcel[nRow2, nColumn2])
CASE TYPE('arrpasstoexcel[nRow2, nColumn2]') = 'C'
cStringtoExcel = cStringtoExcel + TAB + arrpasstoexcel[nRow2, nColumn2]
ENDCASE
ENDFOR
cStringtoExcel = cStringtoExcel + CRLF
ENDFOR
_cliptext = cStringtoExcel
ox.application.worksheets(1).cells(70,1).pastespecial
ox.cells(69,1).value = "=MAX(D70:AY434)"
Thanks again for your all your help.
If only everything in life was as reliable as VFP