Page 1 of 1

Bad object specification error

Posted: Thu Oct 24, 2013 11:04 am
by leah
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.

Re: Bad object specification error

Posted: Thu Oct 24, 2013 11:18 am
by EViews Gareth
The write command doesn't support .XLSX in either EViews 7 or 8.

You should be using WFSAVE, not WRITE.

Re: Bad object specification error

Posted: Thu Oct 24, 2013 11:45 am
by leah
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.

Re: Bad object specification error

Posted: Thu Oct 24, 2013 11:50 am
by EViews Gareth
Could you provide the full program / data (or a simplified version that still causes the error)?

Re: Bad object specification error

Posted: Mon Oct 28, 2013 7:07 am
by leah
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?

Re: Bad object specification error

Posted: Mon Oct 28, 2013 8:06 am
by EViews Gareth
Write stopped being supported in EViews 4.