On Tue, Mar 25, 2008 at 1:57 PM, NickC <[EMAIL PROTECTED]> wrote: > Finally done, as always thanks for your suggestions. Also a quick plug > for > Robert Abram's FTP_Service which looks to be doing the FTP upload > admirably. > > A bit of code for the archives, reading Excel into VFP: >
----------------------------- as a heads up google for excel null errors and connection string. Years back I found that there was another setting that would tell the jet engine to skip all the nulls that got in the way. > lcRegBkPath= "<IncomingSpreadsheetPath>" > loConn = NewObject('ADODB.Connection') > loconn.Provider="Microsoft.Jet.OLEDB.4.0" > loconn.ConnectionString=[Data Source="]+lcRegBkPath+ ; > [";Extended Properties="Excel 8.0;HDR=Yes;";] > loconn.Open() > loRs = NewObject('ADODB.recordset') > oCA = CREATEOBJECT("CursorAdapter") > oCA.DataSourceType = "ADO" > lcWorksheet="<WorksheetName>" > lcRange="A1:Z99" > lcCursor=lcWorksheet > loRS.Open([SELECT * FROM `]+lcWorksheet+[$]+lcRange+[`],loConn) > oCA.Alias=lcCursor > oCA.CursorSchema = "Field1 C(50), Field2 C(50), Field3 C(50)" > IF NOT oCA.CursorFill(.T.,,,loRS) > ? AERROR(laError) > ? laError > ENDIF > oCA.CursorDetach() > EXPORT TO (lcWorksheet) TYPE XL5 > loRS.Close > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com 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.