Corrupt xlsx file using non-english characters

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

johansamuelsson
Posts: 160
Joined: Thu Mar 03, 2011 10:07 pm
Contact:

Corrupt xlsx file using non-english characters

Postby johansamuelsson » Sat Nov 26, 2022 12:07 am

When I use Swedish specific letters such as å,ä and ö, the excel file becomes corrupt. See examples

Code: Select all

WfCreate(page=u) u 1

' EXAMPLE 1
Table Table1
Table1(1,1) = "åäö"
Table1.save(t=xlsx) c:\temp\Table1.xlsx Range=Sheet1!a1

' EXAMPLE 2
Alpha Alpha1="åäö"
WfSave(type=excelxml, cellfmt=eviews) C:\Temp\Alpha1.xlsx @keep Alpha1

' EXAMPLE 3
Series Series1=1
Series1.Label(d) åäö
WfSave(type=excelxml, cellfmt=eviews, attr) C:\Temp\Series1.xlsx @keep Series1


' EXAMPLE 4 an 5 (this works, there seems not to be a legacy-option for table.save)
WfSave(type=excelxml, cellfmt=eviews, legacy) C:\Temp\Alpha2.xlsx @keep Alpha1
WfSave(type=excelxml, cellfmt=eviews, attr, legacy) C:\Temp\Series2.xlsx @keep Series1


Eviews 13 Nov 9 2022 build

Regards Johan

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

Re: Corrupt xlsx file using non-english characters

Postby EViews Jason » Mon Nov 28, 2022 8:50 am

We will investigate the new Excel writing engine. In the meantime use the 'legacy' option to revert back to the old engine when using wfsave.

Code: Select all

WfSave(type=excelxml, cellfmt=eviews,legacy) C:\Temp\Alpha1.xlsx @keep Alpha1


Writing to Excel files via Table.save however is new EViews 13 feature. The 'legacy' option is therefore currently not supported. We will look into adding it in a future patch.

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

Re: Corrupt xlsx file using non-english characters

Postby EViews Jason » Thu Dec 08, 2022 11:53 am

The ability to save xlsx files containing non-english characters using the new EViews 13 Excel writing engine will be fixed in the next patch.

johansamuelsson
Posts: 160
Joined: Thu Mar 03, 2011 10:07 pm
Contact:

Re: Corrupt xlsx file using non-english characters

Postby johansamuelsson » Thu Dec 08, 2022 12:02 pm

Wonderful news!


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 5 guests