Page 1 of 1

program to save tables of various sizes to csv in a loop

Posted: Mon Aug 24, 2015 11:45 am
by mark
Hi

I'm using a loop to generate then save tables that vary in size to csv files.

Each table varies in dimension - the number of rows and columns differ table to table about 30 or so in total.

I'm usng EV9 - enterprise edition and here is this is the code I use to export the cvs file:

p{%2}.save(r=B8:S15, t=csv, n="NAN") outp{%2}

Is there a trick to programing - ie can "r=B8:S15" definition be altered to a wildcard statement - so the program will read each table in each loop iteration, determine table dimensions then save the table tin csv format?

thanks

Re: program to save tables of various sizes to csv in a loop

Posted: Mon Aug 24, 2015 11:48 am
by EViews Gareth
I'm not sure I follow. Why do you need to use the r= option at all? You only want to save part of each table? If so, how do you know which part of each table you want to save?

Re: program to save tables of various sizes to csv in a loop

Posted: Mon Aug 24, 2015 2:17 pm
by mark
THANKS FOR POINTING THE "R=" OUT - REMOVED IT AND THINGS RUN SMOOTH - DUH...