Exporting data to a specific excel sheet using "pagesave"

For questions regarding programming in the EViews programming language.

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

maragloria
Posts: 101
Joined: Tue Jun 29, 2010 7:09 am

Exporting data to a specific excel sheet using "pagesave"

Postby maragloria » Tue May 31, 2011 12:56 pm

Hi there,

I am try to send some data to an excel sheet using the command pagesave.

Here is my complete code:

Code: Select all

 'excel file holding signals - IT CANNOT BE A "xlsx"
%xlsfile = "X:\Equi_Val_Exc_G10\source_modeles_structurel.xls"
pagesave(t=excel) %xlsfile range=facmod_v1!A1 @keep sig_* @smpl 1990m01 @last
pagesave(t=excel) %xlsfile range=facmod_v2!A1 @keep sig_* @smpl 1990m01 @last


Once the code runs, all but one excel sheet disapears. The only one remaining is named "source_modeles_structurel" (as the file name) instead of
"facmod_v2" and "facmod_v1" as I intend to do (these 2 sheets were created prior to runing the code).

How can I refer to a specific excel sheet using the pagesave command? Is there a better command?

I use Eviews 7.

Thanks a lot,

Mara

EViews Glenn
EViews Developer
Posts: 2671
Joined: Wed Oct 15, 2008 9:17 am

Re: Exporting data to a specific excel sheet using "pagesave

Postby EViews Glenn » Tue May 31, 2011 2:12 pm

Unfortunately, pagesave won't write into an existing Excel file...

maragloria
Posts: 101
Joined: Tue Jun 29, 2010 7:09 am

Re: Exporting data to a specific excel sheet using "pagesave

Postby maragloria » Wed Jun 01, 2011 5:48 am

Should I use the EViews Excel Add-in instead?

EViews Glenn
EViews Developer
Posts: 2671
Joined: Wed Oct 15, 2008 9:17 am

Re: Exporting data to a specific excel sheet using "pagesave

Postby EViews Glenn » Wed Jun 01, 2011 8:23 am

Yes. I should have mentioned that the new Excel tools should give you better flexibility since you are coming from the Excel side rather than the EViews side.

maragloria
Posts: 101
Joined: Tue Jun 29, 2010 7:09 am

Re: Exporting data to a specific excel sheet using "pagesave

Postby maragloria » Wed Jun 01, 2011 11:35 am

Ok, thanks a lot. I'll try that.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 27 guests