>Hi
>
>I am trying to write a copy/paste routine of data in a cursor to Excel. I am using Excel automation to do this; open an instance of Excel, create a new worksheet, copy my cursor to the clipbaord using _VFP.DataToClip(), paste into Excel. Everything is fine but the dates seem to be all messed up with the year appearing first sometimes, then at the end, and other combinations. It would appear that Excel does not recognize the date format being pasted.
>
>How can I copy to clipbaord and paste into Excel and ensure my dates format correctly in YYYYMMDD format (or other of my choosing)?
>
>Thanks
Jos,
To get around the date troubles, convert the dates so that excel will be receiving a function as a field/cell
create cursor ppp (aa c(20), bb c(30), cc i)
insert into ppp values('=date(2007,10,10)', 'jos', 1)
insert into ppp values('=date(2007,11,11)', 'jos', 2)
go top
?_vfp.datatoclip(,,3)
Gregory