Page 1 of 1

Opening CSV by Rows

Posted: Tue Nov 24, 2015 10:22 am
by KUN0
I am trying to open a CVS file which is transposed into rows. I have sucessfully used the "byrows" arguement in my wfopen function, but the mnemonic name I want is included in the second column rather than the in the first. Is there a way to open a CSV file by row and use the second column to name the series?

Re: Opening CSV by Rows

Posted: Tue Nov 24, 2015 10:28 am
by EViews Gareth
Yes, Step 3 of the dialog allows you to specify how many header rows there are, and which row the names are in.

By the time you get to Step 3, you've already told EViews to transpose the data, so the columns are now rows.

Re: Opening CSV by Rows

Posted: Tue Nov 24, 2015 11:27 am
by KUN0
I should have been clearer. I need this to run automatically as part of a program. Thus far I have the following...

wfopen(d=new) "s:\DDLdownload\equitymsri.da.csv" byrow

The program is defaulting to using the first column as my series names. I need the second column.

Re: Opening CSV by Rows

Posted: Tue Nov 24, 2015 12:01 pm
by EViews Gareth
Do it using the interface, then look at the command capture log to view the command line form. It will be something using the colhead= argument and the names= argument.

Re: Opening CSV by Rows

Posted: Tue Nov 24, 2015 12:32 pm
by KUN0
I can't figure it out, and I'm being asked by my superiors to stop spending time on this. Please let me know if there is a straightforward answer to this... Screenshot attached.

I need my series to be named according to column B and dated according to row 1

Capture.PNG
Capture.PNG (16.95 KiB) Viewed 7286 times

Re: Opening CSV by Rows

Posted: Tue Nov 24, 2015 12:37 pm
by EViews Gareth
Can you provide the Excel file?

Re: Opening CSV by Rows

Posted: Wed Dec 09, 2015 7:33 am
by KUN0
Here is the file

Re: Opening CSV by Rows

Posted: Wed Dec 09, 2015 9:30 am
by EViews Gareth
wfopen test.csv byrow colhead=2 namepos=last

Re: Opening CSV by Rows

Posted: Wed Dec 09, 2015 12:13 pm
by KUN0
Excellent! Thanks very much!