I need data for gas storage levels in EU countries, which I could retrieve via a URL from an API of the data provider. Unfortunately, the file format is JSON, which RATS cannot read. I have written a small program in R, to download the data into excel files, which then I want to read into RATS for further analysis. However, I run into some difficulties. The preview in the windows explorer shows that the data is fine, including the date column and the headers for storage and capacity. I can also open the file in Excel without a problem. But the Data-Wizard does not read the date column and the headers.
- Code: Select all
OPEN DATA "D:\Rats Files\Energy\France Gas Storage.xlsx"
CALENDAR(7) 2011:1:1
DATA(FORMAT=XLSX,NOLABELS,ORG=COLUMNS,TOP=2,LEFT=2,REVERSE) 2011:01:01 2021:10:06 STORAGE CAPACITY
At least with this code, RATS reads the data, but does not reverse the order. The most recent data from the file remains the first value of the series, however, it should be the last one. What is going wrong? I have the Excel file attached. BTW, when i tried to write the data from R into a comma separated file, I got error message IO19.
Best regards
PeterF