> XLSheet.Cells(i,j) = aVFPvar
>
> As as i a am concerned the current workaround is :
>
> 1- create a temp DBF cursor,
> 2- COPY TO myworksheet.xls TYPE XL5
> 3- open the temp.xls within EXCEL
> 4- do the cosmetics (autofit,font,...)
> 5- save it
>
> As it is a destructive process that can potentially destroy sophisticated
> multi-sheets documents i also offer a more time-consuming refresh option
> that sends Excel tons of :
>
> XLSheet.Cells(i,j) = aVFPvar
>
> If anyone has a better workararound i'd be glad to read. I alas don't think
> it is possible to "feed" Excel cells ranges with VFP array.
>
> François
Why not combine the best of both? Copy to ... type xl5, and then use DDE
to insert that into a predefined sheet, thus keeping all the macros and
other stuff. So, the above scheme would look like this:
1 create a cursor
2 copy to temp.xls type xl5
Now DDE:
3 open myworksheet.xls within excel
4 append info from temp.xls (open as a different document, cut/paste
etc) into myworksheet.xls