Eviews can't export to Excel when print titles are defined

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

linkan
Posts: 9
Joined: Mon Aug 24, 2015 7:23 am

Eviews can't export to Excel when print titles are defined

Postby linkan » Thu Jan 12, 2017 1:02 am

We want to save time when exporting to Excel from Eviews. To do this we have export a long list of variables in one command. Totally almost 800 rows are exported at once. We want to have titles on top of each page. To be readable we have at most about 70 rows per page. We can not put titles on the rows that are on top of the page, because then the titles would be written over by Eviews, so we use the Print titles options in Excel.

The problem is that when we use Print titles we get an error we do not get otherwise, and afterwards the excel file looses all old data.

The name cannot be the same as a built in name.
Old name: Print_Titles
Is there a way to get around this?

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

Re: Eviews can't export to Excel when print titles are defined

Postby EViews Jason » Thu Jan 12, 2017 8:40 am

When using 'wfsave', the 'range' option will give you the ability to specify where to start writing the data.

For example,

Code: Select all

wfsave(type=excelxml, mode=update) macro.xlsx range="Sheet1!a2"

linkan
Posts: 9
Joined: Mon Aug 24, 2015 7:23 am

Re: Eviews can't export to Excel when print titles are defined

Postby linkan » Fri Jan 13, 2017 12:24 am

Yes, that I know. And that is not what I asked about. The problem is that if Print Titles are activaded in the workbook (which writes the titles on top of each page), the workbook that is exported to is replaced by a blank workbook.

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

Re: Eviews can't export to Excel when print titles are defined

Postby EViews Jason » Fri Jan 13, 2017 11:25 am

I cant replicate the error. Can you post the excel file (prior to saving) and your workfile?

linkan
Posts: 9
Joined: Mon Aug 24, 2015 7:23 am

Re: Eviews can't export to Excel when print titles are defined

Postby linkan » Thu Jan 19, 2017 6:47 am

While trying to recreate it with smaller files I do not get the total crash. Neither do we get it every time now on the regular files (it still happens sometimes though).

When the regular file is not crashed we get the same result as on the files I have attached here. That is, the Print Titles are no longer defined. Since we make pdfs via commands of our xlsx-files in the same script, we do not want to have to add the Print Titles manually in between.
Attachments
randomvariable.xlsx
(19.45 KiB) Downloaded 67 times
randomvariable.prg
(296 Bytes) Downloaded 58 times

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

Re: Eviews can't export to Excel when print titles are defined

Postby EViews Jason » Fri Jan 20, 2017 3:25 pm

In the cases where the resulting xlsx file is blank, can you start your Task Manager (ctl+alt+del) and verify if Excel is running in the background. If it is running, kill the task and try reopening the file. It appears as though Excel is keeping the file open and hasn't finished writing it. As soon as you kill the Excel process the file is released and then upon opening the file, the contents appear correct (as least for me it does).

Please verify if this is also true for you and we can proceed from there.

linkan
Posts: 9
Joined: Mon Aug 24, 2015 7:23 am

Re: Eviews can't export to Excel when print titles are defined

Postby linkan » Mon Jan 23, 2017 4:41 am

The excel files don't end up blank. Eviews writes the data into the file, but all existing text and formatting is deleted (when that happens).

But most of the time when we do it now, we do not get this problem, but rather the second one I explained. That the settings for print titles get deleted.

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

Re: Eviews can't export to Excel when print titles are defined

Postby EViews Jason » Mon Jan 23, 2017 8:58 am

Please send an email to support@eviews.com so that we can communicate further.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 9 guests