Error on multiple wfsave commands
Moderators: EViews Gareth, EViews Moderator
Error on multiple wfsave commands
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?
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?
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Error on multiple wfsave commands
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 Developer
- Posts: 870
- Joined: Tue Sep 16, 2008 3:50 pm
Re: Error on multiple wfsave commands
Yguill1,
Can you please send your program and workfile to jason@eviews.com? We would like to replicate the issue.
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
It seems to me that the @keep option is not working using PageSave.
Eviews 13 nov 9 build
Eviews 13 nov 9 build
-
- EViews Developer
- Posts: 798
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Error on multiple wfsave commands
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
Sorry for the late reply, here is an example. When I run this I still see y and z in the new workfile.
Eviews 13 Nov 28 build.
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 Developer
- Posts: 798
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Error on multiple wfsave commands
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:
Steve
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
Ok thanks!
-
- Posts: 17
- Joined: Thu Aug 24, 2023 9:42 am
Re: Error on multiple wfsave commands
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:
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
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
-
- Posts: 17
- Joined: Thu Aug 24, 2023 9:42 am
Re: Error on multiple wfsave commands
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"
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"
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Error on multiple wfsave commands
What's the build date of your copy of EViews (Help->About EViews)?
Follow us on Twitter @IHSEViews
-
- Posts: 17
- Joined: Thu Aug 24, 2023 9:42 am
Re: Error on multiple wfsave commands
October 18 2023
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Error on multiple wfsave commands
Try using EViews 13 instead. I believe it is fixed there.
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 39 guests