Saving Workfile data to Excel (.xlsx) using wfsave

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

msj
Posts: 4
Joined: Tue Jan 05, 2016 12:10 pm

Saving Workfile data to Excel (.xlsx) using wfsave

Postby msj » Tue Nov 14, 2017 5:00 am

My old code for saving Workfile Data to an .xls file worked like a charm:

write(t=xls,na=.,t,d=c,names,dates)".$folder1 . "\\export.xls fcst_1 fcst_2 fcst_3

Now, I would like to save the data to an .xlsx file using the new command wfsave. The current code I have now does not seem to work:

wfsave(type=excelxml)". $folder1 . "\\export.xlsx @keep fcst_1 fcst_2 fcst_3


Any suggestions or comments on how to fix the new code would be highly appreciated!

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

Re: Saving Workfile data to Excel (.xlsx) using wfsave

Postby EViews Gareth » Tue Nov 14, 2017 9:28 am

What is .$folder1 . ?
Follow us on Twitter @IHSEViews

msj
Posts: 4
Joined: Tue Jan 05, 2016 12:10 pm

Re: Saving Workfile data to Excel (.xlsx) using wfsave

Postby msj » Wed Nov 15, 2017 12:33 am

Hello Gareth

Please excuse that I forgot to specify this. The code is written and executed in Perl and I specified that $folder1 = getcwd - get pathname of current working directory.

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

Re: Saving Workfile data to Excel (.xlsx) using wfsave

Postby EViews Gareth » Wed Nov 15, 2017 9:04 am

Well it looks ok to me, assuming you have the quotes and spaces in the right place.
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 4 guests