Page 1 of 1

reading annual data

Posted: Tue May 03, 2016 2:40 pm
by indrani_5
Do you have a documentation in your manuals on how to format data on excel sheets so that it can be read without hassles into RATS?

Re: reading annual data

Posted: Tue May 03, 2016 4:17 pm
by TomDoan
If you're trying to generate a set of dates, you can use something like

=DATE(1923;1;1)
=DATE(YEAR(A2+366);1;1)
etc.

and format them as just yyyy in the date formats. (The same general idea works for generating quarter and month sequences). That's on page Int 119 in the Introduction. 1923-1, 1924-1 (as strings) also work. However, things like that can be hard to put into Excel since it interprets them as arithmetic (and, for instance, 1923:1 as a time). As an alternative, 1923a1, 1924a1 goes in as strings.

Of course, with annual data, you usually just have a fixed amount of data that starts at a known time period, so you can just use

cal(a) 1923:1
data(format=xls,org=columns) 1923:1 2015:1 myx myy myz

without doing anything special with the XLS file. Labeling the dates only matters if you are trying to pull subsets of the data out as part of the DATA instruction.

Re: reading annual data

Posted: Tue May 03, 2016 6:18 pm
by indrani_5
Can u please tell me what is wrong in my excel sheet that RATS reads the data as undated despite me setting the calender and data format as annual under data/graphics?

Re: reading annual data

Posted: Tue May 03, 2016 6:56 pm
by TomDoan
Did you push the Scan button under File Dates? That's what actually causes it to scan the file and guess the date scheme.

Re: reading annual data

Posted: Tue May 03, 2016 7:07 pm
by indrani_5
the scan button is not highlighting in this case