Hi
At my workplace we have started using Eviews 13 and having problems with xlsm-files that have VBA code.
When we are saving data to a larger xlsm-files, with multiple sheets, and with VBA-code, the file becomes corrupted. Excel says "We found a problem with some content in 'Test.Xlsm'. Do you want to try to recover as much as possible? Click yes if you trust the source of the workbook". When wee try to recover the file excel says that the VBA-code is removed.
The same code works fine in Eviews 12. Can we email you the files if you can run a test?
We use Eviews 13, Standar Edition – Oct 11 2022 build.
(If we delete all sheets except the sheet that we ar saving data to everything works fine)
Regards Johan
Problem with VBA-code when saving data to xlsm-files
Moderators: EViews Gareth, EViews Moderator
-
- Posts: 160
- Joined: Thu Mar 03, 2011 10:07 pm
- Contact:
-
- EViews Developer
- Posts: 870
- Joined: Tue Sep 16, 2008 3:50 pm
Re: Problem with VBA-code when saving data to xlsm-files
Hello Johann.
For EViews 13 we introduced a new Excel writing engine. The new engine apparently is not compatible with macro enabled Excel files (xlsm). If you could send me your xlsm file to jason@eviews.com, we will look into possibly fixing it.
In the meantime, use the 'legacy' option when writing your Excel files. This will use the same writing engine as EViews 12.
So if your old command was
change it to:
For EViews 13 we introduced a new Excel writing engine. The new engine apparently is not compatible with macro enabled Excel files (xlsm). If you could send me your xlsm file to jason@eviews.com, we will look into possibly fixing it.
In the meantime, use the 'legacy' option when writing your Excel files. This will use the same writing engine as EViews 12.
So if your old command was
Code: Select all
wfsave(type=excelxml, mode=update) test.xlsm
change it to:
Code: Select all
wfsave(type=excelxml, mode=update,legacy) test.xlsm
-
- Posts: 160
- Joined: Thu Mar 03, 2011 10:07 pm
- Contact:
Re: Problem with VBA-code when saving data to xlsm-files
Ok, works fine with "legacy"-command. Perhaps the "legacy"-option should be the default for all-xlsm files when using wfsave
I am sending an email with two attached files, "Test.prg" and "Test.xlsm" so you can test
Thanks!
Regards Johan
I am sending an email with two attached files, "Test.prg" and "Test.xlsm" so you can test
Thanks!
Regards Johan
-
- EViews Developer
- Posts: 870
- Joined: Tue Sep 16, 2008 3:50 pm
Re: Problem with VBA-code when saving data to xlsm-files
This will be fixed in the next patch
-
- Posts: 1
- Joined: Wed Sep 30, 2020 3:08 am
Re: Problem with VBA-code when saving data to xlsm-files
Hi,
i would just like to add to this thread that we have the same problem (excel files becomes corrupted when saved to), but also with ordinary excelfiles (.xlsx).
Kind regards
Tomas
Eviews 13 (Enterprise Edition – Apr 18 2023 build)
i would just like to add to this thread that we have the same problem (excel files becomes corrupted when saved to), but also with ordinary excelfiles (.xlsx).
Kind regards
Tomas
Eviews 13 (Enterprise Edition – Apr 18 2023 build)
Who is online
Users browsing this forum: No registered users and 15 guests