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

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

mark
Posts: 37
Joined: Thu Mar 12, 2009 3:27 pm

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

Postby mark » Mon Aug 24, 2015 11:45 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13585
Joined: Tue Sep 16, 2008 5:38 pm

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

Postby EViews Gareth » Mon Aug 24, 2015 11:48 am

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?

mark
Posts: 37
Joined: Thu Mar 12, 2009 3:27 pm

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

Postby mark » Mon Aug 24, 2015 2:17 pm

THANKS FOR POINTING THE "R=" OUT - REMOVED IT AND THINGS RUN SMOOTH - DUH...


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests