Error on multiple wfsave commands

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

JeffvdN
Posts: 18
Joined: Thu Aug 02, 2018 12:18 pm

Error on multiple wfsave commands

Postby JeffvdN » Sat Oct 01, 2022 7:18 am

I have a routine that has a lot of wfsave commands to excel. I have always had trouble with it crashing on these commands but it seems to be worse now, and there is a new error message. Here is the latest one. It doesn't always crash on the same wfsave command.

Unable to allocate memory for working array in "WFSAVE(TYPE=EXCELXML, MODE=UPDATE) DATA.XLSX RANGE="Tab1!D4" @KEEP Group1 @SMPL 1979M1 2022M09" in TRANSFORMATIONS.PRG on line 1810.

Some of the Excel files are large but not all of them. I tried exporting into new blank excel files to avoid corrupting the old excel files. That seemed to help but I am still getting crashes.

And often, it just crashes the program, no error message.

I think I have decided to export to csv instead. That seems to work better. It certainly is faster.

Any idea what is going on?

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

Re: Error on multiple wfsave commands

Postby EViews Gareth » Sat Oct 01, 2022 7:47 am

Which version of EViews?
Follow us on Twitter @IHSEViews

yguill1
Posts: 11
Joined: Tue Jan 31, 2012 1:53 am

Re: Error on multiple wfsave commands

Postby yguill1 » Tue Nov 08, 2022 3:54 am

I have the same error (Unable to allocate memory for working array) when doing multiple 'pagesave' in a loop and writing to XLSX. My understanding is that this command is using the new Excel writing engine (Eviews 13 Oct 11 build). The error does not always happen and when it happens it is not always on the same item in the list over which I am looping.

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Error on multiple wfsave commands

Postby EViews Jason » Tue Nov 08, 2022 8:48 am

Yguill1,

Can you please send your program and workfile to jason@eviews.com? We would like to replicate the issue.

ErikG
Posts: 78
Joined: Wed Jan 23, 2013 1:18 am

Re: Error on multiple wfsave commands

Postby ErikG » Fri Nov 18, 2022 5:27 am

It seems to me that the @keep option is not working using PageSave.

Eviews 13 nov 9 build

EViews Steve
EViews Developer
Posts: 788
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Error on multiple wfsave commands

Postby EViews Steve » Fri Nov 18, 2022 1:21 pm

Do you have an example workfile and pagesave command that demonstrates this? I can't seem to recreate the problem.

ErikG
Posts: 78
Joined: Wed Jan 23, 2013 1:18 am

Re: Error on multiple wfsave commands

Postby ErikG » Tue Dec 27, 2022 1:41 am

Sorry for the late reply, here is an example. When I run this I still see y and z in the new workfile.

Code: Select all

WfCreate C:\temp\temp.wf1 q 2000 2010
Series x = 2
Series y = 3
Series z = 5

PageSave C:\temp\Newdata.wf1 @keep x
WfClose temp
WfUse C:\temp\Newdata.wf1


Eviews 13 Nov 28 build.

EViews Steve
EViews Developer
Posts: 788
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Error on multiple wfsave commands

Postby EViews Steve » Mon Jan 09, 2023 2:52 pm

Hi ErikG:

Sorry for the late response.

The @keep option is ignored when the new file being created is a an EViews workfile. @keep is only used when saving a foreign data format (such as a Excel spreadsheet, or a CSV text file).

Since workfiles are our native format, you can workaround this by simply running a few commands before you run PAGESAVE to remove any items you didn't want. For example, to delete all series objects except for "X", you could run the following:

Code: Select all

group grptodel * not x
%s = grptodel.@members
delete {%s}


Steve

ErikG
Posts: 78
Joined: Wed Jan 23, 2013 1:18 am

Re: Error on multiple wfsave commands

Postby ErikG » Tue Jan 10, 2023 5:20 am

Ok thanks!

oleviasharbaugh
Posts: 17
Joined: Thu Aug 24, 2023 9:42 am

Re: Error on multiple wfsave commands

Postby oleviasharbaugh » Mon Dec 18, 2023 3:07 pm

I'm getting this error when I try to save my data into an excel file using Eviews 12.

Here is the code that I'm using:

Code: Select all

%begin_export="2013:11"
%end_hist="2023:11"
wfsave(type=excelxml) {%outputdirectory}\CHRVALUE.xlsx range="CHRVALUE!a1" @smpl {%begin_export} {%end_hist} @keep g_CHRVALUE

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

Re: Error on multiple wfsave commands

Postby EViews Gareth » Mon Dec 18, 2023 3:25 pm

Which error?
Follow us on Twitter @IHSEViews

oleviasharbaugh
Posts: 17
Joined: Thu Aug 24, 2023 9:42 am

Re: Error on multiple wfsave commands

Postby oleviasharbaugh » Mon Dec 18, 2023 3:31 pm

The error associated with the original post, sorry. This one:

Unable to allocate memory for working array in "wfsave(type=excelxml) {%output}\CHRVALUE.xlsx range="CHRVALUE!a1" @smpl {%begin_export} {%end_hist} @keep g_CHRVALUE"

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

Re: Error on multiple wfsave commands

Postby EViews Gareth » Mon Dec 18, 2023 3:42 pm

What's the build date of your copy of EViews (Help->About EViews)?
Follow us on Twitter @IHSEViews

oleviasharbaugh
Posts: 17
Joined: Thu Aug 24, 2023 9:42 am

Re: Error on multiple wfsave commands

Postby oleviasharbaugh » Mon Dec 18, 2023 3:48 pm

October 18 2023

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

Re: Error on multiple wfsave commands

Postby EViews Gareth » Mon Dec 18, 2023 3:50 pm

Try using EViews 13 instead. I believe it is fixed there.
Follow us on Twitter @IHSEViews


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 16 guests