EXCEL write to named sheet

For questions and discussion related to reading in and working with data.
mboldin
Posts: 5
Joined: Fri Oct 04, 2013 9:36 am

EXCEL write to named sheet

Unread post 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?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: EXCEL write to named sheet

Unread post 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.
Post Reply