Export string objects to Excel

For questions regarding programming in the EViews programming language.

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

dravenous
Posts: 33
Joined: Thu Jan 29, 2015 2:30 pm

Export string objects to Excel

Postby dravenous » Thu Mar 09, 2017 1:19 pm

Hey guys,

I was wondering if/how you can export a string object from eviews to excel. I was trying something along these lines. Pagesave works for the regular series obviously, but it doesn't seem to recognize it if it's a string object. I've exported a string object to eviews before using the COM automation Get() in a VBA macro, but I'm sure there must be a way to do it from within eviews solely? Let me know, thanks!

current code:

Code: Select all

for %y {clientall} Metnames.add ee{%y} Metnames.add mhinc{%y} Metnames.add sfepm{%y} next for !i=1 to Metnames.@count %name= Metnames.@seriesname(!i) string s{%name} = {%name}.@remarks next %d = @wcross("smhinc", clientall) %e= @wcross("see", clientall) %f= @wcross("ssfepm", clientall) pagesave(t=excel, mode=update) C:\test1.xls range="Q_MHINC!F4" byrow @keep mhinc** pagesave(t=excel, mode=update) C:\test1.xls range="Q_MHINC!IA4" @keep {%d}

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

Re: Export string objects to Excel

Postby EViews Gareth » Thu Mar 09, 2017 1:32 pm

Either the way you're doing it, or put the string object into a table and save the table as a csv.

dravenous
Posts: 33
Joined: Thu Jan 29, 2015 2:30 pm

Re: Export string objects to Excel

Postby dravenous » Thu Mar 09, 2017 1:40 pm

You mean with the com automation? because that pagesave doesn't grab it.

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

Re: Export string objects to Excel

Postby EViews Gareth » Thu Mar 09, 2017 1:42 pm


dravenous
Posts: 33
Joined: Thu Jan 29, 2015 2:30 pm

Re: Export string objects to Excel

Postby dravenous » Thu Mar 09, 2017 1:45 pm

Alrighty, thanks.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests