Read command in Rats 10

For questions and discussion related to reading in and working with data.
Gilbril
Posts: 78
Joined: Thu Aug 19, 2010 2:00 pm

Read command in Rats 10

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

Re: Read command in Rats 10

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