Page 1 of 1

Read command in Rats 10

Posted: Tue Oct 06, 2020 10:01 am
by Gilbril
Dear Tom,
I want to read series names into a string vector. I have to navigate around other columns and descriptions using left right and top.

dec vector[string] Descriptions
open C:\DB.xlsx
read(for=xlsx, sheet= 'Descr', left=9,right=10, top=4, varying) Desccriptions
close

When I run this comamnd in Rats 10 it seems not to find the path and the execution of the code is stopped by the 'file for data window'. I do have this problem only in rats 10 in rats 9.2 it runs smoothly without interruption. Can you help me with that?

Re: Read command in Rats 10

Posted: Tue Oct 06, 2020 12:12 pm
by TomDoan
You're really not supposed to put files in the root directory (directly in c:\) on a Windows machine.

The problem you have is that your OPEN instruction needs to read OPEN DATA c:\db.xlsx. You forgot the I/O unit name.