Differences between revisions 3 and 9 (spanning 6 versions)
Revision 3 as of 2007-01-16 00:21:13
Size: 654
Editor: nathan
Comment:
Revision 9 as of 2007-01-16 01:25:13
Size: 846
Editor: nathan
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= OFFICE CHOICE DATA IMPORT =
Line 3: Line 4:
= Stock import: = == Stock import: ==
Line 8: Line 9:
Inside stock.txt is hopefully data for all those fields in fixed with format. However since this data and programs are from 1991 the dates are all fubared and so stuff for say 26th july 2006 will come out in teh format, 07/26/106, this also frells with the fixed with output so you need to manually adjust the headings to make them align before trying to open it with excel. now because this program is from 1991 the date format totally screws up with 2000+ dates and needs to be fixed because it it frells the fixed width formatting and I noticed dates and data would be chopped off when importing to excel, anyways this simple command fixes dates in teh format of mm/dd/'''1'''yy to become mm/dd/yy

cat stock.txt | sed 's/\([0-9][0-9]\/[0-9][0-9]\/\)1\([0-9][0-9]\)/\1\2/g' > stockdatefixed.txt

You shouldn't need to fix up the alignment after that but check it anyways before importing into excel.

OFFICE CHOICE DATA IMPORT

Their data is in some sql flat file database and comes with dos apps to extract it with.

Stock import:

To generate the data use this command:

sql.exe "select code,sup_code,c_code,name,per,sg_code,n_cost,on_h,lpo_date,lm_date,lr_date,price from stock;" > stock.txt

now because this program is from 1991 the date format totally screws up with 2000+ dates and needs to be fixed because it it frells the fixed width formatting and I noticed dates and data would be chopped off when importing to excel, anyways this simple command fixes dates in teh format of mm/dd/1yy to become mm/dd/yy

cat stock.txt | sed 's/\([0-9][0-9]\/[0-9][0-9]\/\)1\([0-9][0-9]\)/\1\2/g' > stockdatefixed.txt

You shouldn't need to fix up the alignment after that but check it anyways before importing into excel.

OfficeImport (last edited 2013-09-18 06:09:34 by localhost)