Almost there!
It transpires that writing with ADO is nearly impossible so I have almost
found another way...
1). Use ADO to read all data from one worksheet
2). Use a CursorAdapter to convert the ADO Record Set into a VFP cursor.
3). Use the VFP 'EXPORT TO x TYPE XL5' to create the new spreadsheet.
Only minor problem is that CursorAdapter resolves all the text fields in the
ADO record set to Memo fields, unfortunately VFPs Export TO and Copy TO
commands ignore memo fields, bugger! Well I have got a test working by
copying the cursor to a table and then converting all the memo fields to
text.
Remaining questions if anyone has any suggestions:
1). Is there any way to get CursorAdapter to import as text fields rather
than memo?
2). Is there any easy way of converting all memo fields in a cursor to text?
Happy coding,
Nick
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Graham Brown (CompSYS)
> Sent: 16 March 2008 16:15
> To: ProFox Email List
> Subject: RE: Getting at Excel data from VFP
>
> Yep the articles looked interesting. Will have a look when I get 5 as well
> as hadn't realised Excel can be queried with Jet.
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of NickC
> Sent: 16 March 2008 15:54
> To: 'ProFox Email List'
> Subject: RE: Getting at Excel data from VFP
>
>
> Thx Graham, looks like this will work. ADO is apparently installed with
> IIS
> so is present on the server.
>
> Nick
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf
> > Of Graham Brown (CompSYS)
> > Sent: 15 March 2008 15:17
> > To: ProFox Email List
> > Subject: RE: Getting at Excel data from VFP
> >
> > Hi
> >
> > What about this on technet?
> >
> >
> http://www.microsoft.com/technet/scriptcenter/resources/officetips/jun05/t
> > ip
> > s0607.mspx
> >
> > and this
> >
> > http://www.visualbasic.happycodings.com/Database_SQL_Stuff/code14.html
> >
> > It doesn't refer to having Excel loaded just the standard JET Oledb
> > drivers.
> > Not tried the code but it looks promising.
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Behalf Of NickC
> > Sent: 15 March 2008 13:50
> > To: 'ProFox Email List'
> > Subject: RE: Getting at Excel data from VFP
> >
> >
> > Thx Graham but that will only work on a machine that has Excel installed
> > on
> > it.
> >
> >
> >
> >
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/!&[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.