Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax error
Message
From
28/08/2008 02:44:29
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01341460
Message ID:
01342459
Views:
14
hi,
thank you for help

it works as below
thisform.text11.Value=GETFILE('xls')
IMPORT FROM (thisform.text11.value) TYPE xls

use JUSTSTEM(thisform.text11.value)
tt=JUSTSTEM(thisform.text11.value)

CLOSE all
USE (tt) excl
 
*set step on

FOR gnCount = 1 TO FCOUNT( )
   m.OldName =  FIELD(gnCount)
   m.NewName = ALLTRIM(EVALUATE(FIELD(gnCount)))
     *******************************************************

      ALTER TABLE (tt) RENAME COLUMN (m.OldName) TO (m.NewName)

 NEXT

     *******************************************************
ALTER TABLE (TT) ADD COLUMN TXPNO C(19) 
ALTER TABLE (TT) ADD COLUMN YEARe C(6) 
ALTER TABLE (TT) ADD COLUMN INFTYPE C(2) 
ALTER TABLE (TT) ADD COLUMN INFDATE C(12) 
ALTER TABLE (TT) ADD COLUMN OFFCODE C(6) 
ALTER TABLE (TT) ADD COLUMN ENTRYID C(15) 
ALTER TABLE (TT) ADD COLUMN ENTDATE C(12) 
ALTER TABLE (TT) ADD COLUMN CONFFLAG C(3) 
ALTER TABLE (TT) ADD COLUMN CONFID C(12) 
ALTER TABLE (TT) ADD COLUMN CONFDATE C(12) 
scan
replace TXPNO WITH THISFORM.TEXT1.Value
replace YEARe WITH THISFORM.TEXT2.Value
replace INFTYPE WITH THISFORM.TEXT3.Value
replace INFDATE WITH THISFORM.TEXT4.Value
replace OFFCODE WITH THISFORM.TEXT5.Value
replace ENTRYID WITH THISFORM.TEXT6.Value
replace ENTDATE WITH THISFORM.TEXT7.Value
replace CONFFLAG WITH THISFORM.TEXT8.Value
replace CONFID WITH THISFORM.TEXT9.Value
replace CONFDATE WITH THISFORM.TEXT10.Value
endscan
>See also Re: Best way to re-factor Thread #1135774 Message #1135811
>
>Not sure if this is the latest version of the code.
>
>>hi
>>What is the purpose of this code?
>>
>>many companys send excel sheet monthly have many fileds , i must make many operations one of them insert new fields have spical data to complate this work.
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform