CFA stores its data in plain text files. That means that you can create your own data files for use within Excel, using CFA, for example:
- Download from an Access database
- Extract from an accounting system
- Dump from a Visual Basic program
To download the data from another application, you will need to do a bit of programming, probably using VBA or similar.
The format of the data file you need to create is as follows. Make sure you look at a typical data file created by CFA to check you have the format right.
The Header
The data file is divided into sections. The first section is the [HEADER]. In this section you need all the overall details of the data being downloaded:
[HEADER]
Date=20030529202456
User=JohnD311058
DownLoadFileName=c:\cfadata\cfatest05_000008.txt
DownLoadProgram=cfa.XLA
DownLoadProgramVersion=1.050
DownLoadName=
OrganisationName=Business Functions Ltd
ApplicationName=Microsoft Excel
ApplicationVersion=10
Prefix=MYPREF
Notes
- The prefix will be assigned to the front of EVERY range name.
- Most of the details here are only used by the log file (used by the Data Manager).
Ranges
Next are the various ranges in the data file, in the section entitled [RANGES]. For example:
[RANGES]
T_GLOBAL 8 1 20000101 20010101 20020101 20030101 20040101 20050101 20060101 20070101
[SHEET] Sheet4
V_RANGE2D 12 3 2.0000 2.0000 2.0000 2.0000 2.0000 2.0000 2.0000 2.0000 2.0000 2.0000
[SHEET] Sheet3
V_CAP 1 1 67.0000
V_INF 1 1 45.0000
[SHEET] Sheet2
T_TB2 8 1 20000101 20000701 20010101 20010701 20020101 20020701 20030101 20030701
V_FCST 3 1 33.0000 11.0000 22.0000
V_TXT1 1 1 FRED
V_TXT2 2 1 BILL BEN
X_COSTS2 8 1 400.0000 500.0000
X_SALES2 8 1 100.0000 200.0000
[SHEET] Sheet1
X_COSTS 8 1 40.0000 50.0000 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000
X_SALES 8 1 10.0000 20.0000
Notes
- Numerical values need to be separated by the TAB character (vbtab in Visual Basic).
- The first field is the range name, the second is the SIZE of the range and the third is the SIZE of the y-dimension (frequently 1). Thereafter it is the values that correspond with the times.
- The date is always in the format YYYYMMDD.
Ending the Data File
Finally you need the [END] keyword to complete the file:
[END]
Next: CFA FAQ
|