Jump to content


Click the link below to see the new game I'm developing!


bmoussa

Member Since 10 Mar 2003
Offline Last Active Mar 05 2012 08:43 PM
-----

Posts I've Made

In Topic: take on data from excel file

19 January 2005 - 04:25 AM

sorry for the typo.

“Alt<” enter ‘c_pi_txt”. should be

“Alt<” enter ‘c_pi.txt”.

Good Luck

Bill

In Topic: take on data from excel file

19 January 2005 - 04:18 AM

Since you are using SuperLayer (SL), I assume you are on a Glovia ERP.
To load data from Excel:
1- Save the worksheet in CSV format with comma delimited, or if the data has impeded commas (e.g. address), use semi comma. This will create a file with extension “.csv”
2- Rename this file to extension “.txt”. Assume the file name is “c_pi.txt”
3- Copy this file to …../userdata directory.

In SL
1- Option #2 create a file, for example “C_PI” (for Physical Inventory). In the alternate file name field, “Alt<” enter ‘c_pi_txt”.
2- Make the first field “C_PI_RECORD” with record length say “A” 200, and make sure that the Key field is blank. When getting out from the File Def, you are going to get an error message about file has no key, ignore it.
3- Use Option # 7 External File. File name = C_PI, File type = SEQ
4- Make the External type for the only field “C_PI_RECORD” “ALPHA”.

Create a function that reads C_PI file and updating the Glovia file/table.
Using the FOR statement look for the comma and move the data, for example:

#X = LEN(C_PI_RECORD)
FOR #I = 1 TO #X
IF C_PI_RECORD(#I,#I) = ‘;’ THEN LOOPEXIT;
ENDFOR
ITEM = C_PI_RECORD(1,(#I – 1))
#J = #I + 1
FOR #K = #J TO #X
IF C_PI_RECORD(#K,#K) = ‘;’ THEN LOOPEXIT
ENDFOR
REVISION = C_PI_RECORD(#J,(#K – 1))

And so on. You need to hard code the CCN in key mapping window, if it is not on the excel file.

Click the link below to see the new game I'm developing!