Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace field with blank (space)
Message
From
01/04/2007 02:40:51
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01208793
Message ID:
01210929
Views:
30
hi,
thank you so much it works.
>Mohammed,
>
>The following code worked fine for me with your table (I don't see 0 at all)
>
>
>CLOSE all
>
>use answers excl
>browse
>*>select answers && excl - you can not put exclusive in SELECT command, it should be in the USE command
>
>local lnI as Integer, llError as Logical
>
>local array laFields[1]
>
>afields(laFields)
>
>for lnI = 1 to alen(laFields,1)
>
>  llError = .f.
>
>if inlist(laFields[m.lnI,2],'N','B','I')&&Invalid subscript reference
>
>   if not laFields[m.lnI,5] && &&Invalid subscript reference
>
>       try
>
>         ALTER TABLE Answers  ALTER COLUMN (laFields[m.lnI,1]) NULL
>
>       catch to loError
>
>          llError = .t.
>
>       endtry
>
>   endif
>
>   if not m.llError
>
>       replace (laFields[lnI,1]) with null for empty(&laFields[lnI,1])
>
>   endif
>
>endif
>
>*ENDFOR
>
>next
>
>brow
>
>*********************convert to excel
>
>
>
>*GETFILE()
>
>gcDelimName = ALIAS( ) + '.xls'
>
>gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
>
>IF EMPTY(gcDelimFile)
>
>   CANCEL
>
>ENDIF
>
>COPY TO (gcDelimFile) XLS
>
>I'm not going to answer my e-mail next week and I definitely prefer to receive questions in the forum rather by e-mail.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform