impexc2bd — importation of a csv excel file
impexc2bd(filein,sep,fileout,arg1, ,argn)
filein = name of the file to be imported (between quotes)
sep = separator used in the filein (between quotes)
fileout = name of the scilab file where to save the imported data (between quotes)
argi = optional arguments
- 'namedat=xxx' where xxx is the name given to the field dates in the .csv file (default: dates)
- 'namena=x1;x2; xn' where xi are the values that the Non Available data can take in the .csv file ('default: ' ' and '#N/A')
- 'prefix=xxx' where xxx is the prefix that will be added to the names of the variables in the .csv database to obtain their names in the Scilab .dat database
Nothing: the imported series are saved in the file named fileout
1) impexc2bd('macros/bdexamples/bdhenderic.csv',';','mylibrary/bdhenderic.dat') 2) impexc2bd('macros/bdexamples/bdhenderic.csv',';','mylibrary/bdhenderic.dat','namena=:; ','namedat=dates','prefix=uk_') Example 1 provides the importation of date in file macros/bdexamples/bdhenderic.csv into the Scilab file mylibrary/bdhenderic.dat. The separator is here ' ;'. Example 2 allows various options: NA can be blanks or ':'; the dates are labelled dates (equivalent here to the default option, but other names are possible); each variable in the database will be prefixed uk_ (giving uk_lm1, uk_lp, uk_ly, uk_rnet).