Nice suggestion Graham, unfortunately NULLDISPLAY only affects what is
displayed the table still contains nulls underneath and those seem to cause
GenHTML to output crap.

Thanks,
        Nick


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Graham Brown (CompSYS)
> Sent: 28 March 2008 10:29
> To: ProFox Email List
> Subject: RE: Getting at Excel data from VFP
> 
> Does Set NullDisplay to "" handle that?
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of NickC
> Sent: 28 March 2008 10:08
> To: 'ProFox Email List'
> Subject: RE: Getting at Excel data from VFP
> 
> 
> Stephen,
> 
> I do indeed now have the null problem but the only suggestion I can find
> is
> IMEX=1 which doesn't actually help with the problem I have.
> 
> The problem is that any empty Excel fields get imported by the ADO
> CursorAdapter as .null., then when I process that cursor through GenHTML
> (which I am now using for creating the output) those fields are simply
> ignored.
> 
> The best I can come up with at the moment is to loop through each record
> and
> each field in each cursor converting nulls to blank, can anyone think of a
> better way of doing this?
> 
> Cheers,
>       Nick
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf
> > Of Stephen Russell
> > Sent: 25 March 2008 19:34
> > To: ProFox Email List
> > Subject: Re: Getting at Excel data from VFP
> >
> > 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.

Reply via email to