Page 1 of 1
Error on multiple wfsave commands
Posted: Sat Oct 01, 2022 7:18 am
by JeffvdN
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?
Re: Error on multiple wfsave commands
Posted: Sat Oct 01, 2022 7:47 am
by EViews Gareth
Which version of EViews?
Re: Error on multiple wfsave commands
Posted: Tue Nov 08, 2022 3:54 am
by yguill1
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.
Re: Error on multiple wfsave commands
Posted: Tue Nov 08, 2022 8:48 am
by EViews Jason
Yguill1,
Can you please send your program and workfile to
jason@eviews.com? We would like to replicate the issue.
Re: Error on multiple wfsave commands
Posted: Fri Nov 18, 2022 5:27 am
by ErikG
It seems to me that the @keep option is not working using PageSave.
Eviews 13 nov 9 build
Re: Error on multiple wfsave commands
Posted: Fri Nov 18, 2022 1:21 pm
by EViews Steve
Do you have an example workfile and pagesave command that demonstrates this? I can't seem to recreate the problem.
Re: Error on multiple wfsave commands
Posted: Tue Dec 27, 2022 1:41 am
by ErikG
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.
Re: Error on multiple wfsave commands
Posted: Mon Jan 09, 2023 2:52 pm
by EViews Steve
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
Re: Error on multiple wfsave commands
Posted: Tue Jan 10, 2023 5:20 am
by ErikG
Ok thanks!
Re: Error on multiple wfsave commands
Posted: Mon Dec 18, 2023 3:07 pm
by oleviasharbaugh
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
Re: Error on multiple wfsave commands
Posted: Mon Dec 18, 2023 3:25 pm
by EViews Gareth
Which error?
Re: Error on multiple wfsave commands
Posted: Mon Dec 18, 2023 3:31 pm
by oleviasharbaugh
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"
Re: Error on multiple wfsave commands
Posted: Mon Dec 18, 2023 3:42 pm
by EViews Gareth
What's the build date of your copy of EViews (Help->About EViews)?
Re: Error on multiple wfsave commands
Posted: Mon Dec 18, 2023 3:48 pm
by oleviasharbaugh
October 18 2023
Re: Error on multiple wfsave commands
Posted: Mon Dec 18, 2023 3:50 pm
by EViews Gareth
Try using EViews 13 instead. I believe it is fixed there.