Page 1 of 1

EXCEL write to named sheet

Posted: Mon May 02, 2016 8:30 am
by mboldin
Can RATS write to named sheets in EXCEL format.
I know we can read
DATA(FORMAT=XLSX,ORG=COLUMNS,SHEET="Current") 2001 2016 year y x1 x2
and I would like to copy to the same file in separate 'Forecast' sheet
COPY(FORMAT=XLSX,ORG=COLUMNS,SHEET="Forecast") 2017 2020 year fy

If copy can not select a sheet, is there an easy, suggested workaround?

Re: EXCEL write to named sheet

Posted: Tue May 03, 2016 11:41 am
by TomDoan
It's not merely that you can't set a sheet---the COPY instruction is designed to write files in one go, except when you're using one of a few text-based formats. The only formats that we have that will read and write to a single file/database are RATS and Fame.

BTW, I think you want 2001:1 and 2016:1 for the dates. 2001 and 2016 are just numbers.