Bad object specification error

For questions regarding programming in the EViews programming language.

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

leah
Posts: 35
Joined: Tue Jul 16, 2013 2:29 pm

Bad object specification error

Postby leah » Thu Oct 24, 2013 11:04 am

Hello,

I'm trying to run a program that creates a series of tables in excel. It has been run many times in the past without issue, but now when we try it, it fails to generate excel spreadsheets and gives the error message:

Bad object specification "P:\BBOX\Working\Current\b131024b" in "WRITE(T=XLSX,T) P:\BBOX\TABLES\COMP_TABLES\OUTPUT\NEAR_TERM_B131 ...

Does anyone know what could be causing this error? Nothing has been changed in the program except for dates and some databases, although the last time we used it we were using eviews 7 and have since switched to 8. Thanks in advance for your help.

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

Re: Bad object specification error

Postby EViews Gareth » Thu Oct 24, 2013 11:18 am

The write command doesn't support .XLSX in either EViews 7 or 8.

You should be using WFSAVE, not WRITE.

leah
Posts: 35
Joined: Tue Jul 16, 2013 2:29 pm

Re: Bad object specification error

Postby leah » Thu Oct 24, 2013 11:45 am

Sorry about that, I accidentally posted the error from when I switched to xlsx from xls to see if it work. I get the same error message when using xls. After looking at it further, it seems that the problem arises when the program tries to write string variables at the end of the command. The first and last two lines are:

write(t=xls,t) P:\BBOX\Tables\Comp_tables\output\near_term_{%rundate} _
....
100*(new_gdp-new_gdi)/new_gdi 100*(old_gdp-old_gdi)/old_gdi 100*(ma_gdp-ma_gdi)/ma_gdi _
%newbox %oldbox %bluechip %mabase %gibase

When we tried running it with the string variables commented out, it worked.

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

Re: Bad object specification error

Postby EViews Gareth » Thu Oct 24, 2013 11:50 am

Could you provide the full program / data (or a simplified version that still causes the error)?

leah
Posts: 35
Joined: Tue Jul 16, 2013 2:29 pm

Re: Bad object specification error

Postby leah » Mon Oct 28, 2013 7:07 am

So it appears that you can no longer use the write command on a string with a backslash in it. I.e. this works:

write(t=xls,t) U:\hello "hello"

But this does not:

write(t=xls,t) U:\hello2 "hello\"

Is this just a bug/do you know a way to get around it?

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

Re: Bad object specification error

Postby EViews Gareth » Mon Oct 28, 2013 8:06 am

Write stopped being supported in EViews 4.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests