Import of Excel files generated by R

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

kganev
Posts: 2
Joined: Fri Feb 22, 2019 8:22 am

Import of Excel files generated by R

Postby kganev » Fri Feb 22, 2019 10:38 am

Dear all,

I am trying to import in EViews (versions 9.5 and 10+) Excel files that are generated using R packages such as openxlsx and writexl. The files are seamlessly opened in MS Excel 2013 and 2016 but cannot be imported using the import command. I am attaching an example xlsx file here.
What I was able to see was that the xml files that underlie the xlsx's are different from the ones generated by MS Excel itself.
I would be grateful for a solution (different from re-saving the files in Excel or using csv).
Attachments
usd_eur.xlsx
(6.33 KiB) Downloaded 294 times

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

Re: Import of Excel files generated by R

Postby EViews Jason » Fri Feb 22, 2019 3:32 pm

The xlsx file is missing the 'spans=' attribute for each row. Without the 'spans' attribute, EViews cannot tell (without great difficulty) how many columns are in a row.

You can either re-save the Excel file (which you've already mentioned you don't want to do) or ask the authors of writexl to add the 'spans' attribute to the row specification.

kganev
Posts: 2
Joined: Fri Feb 22, 2019 8:22 am

Re: Import of Excel files generated by R

Postby kganev » Sat Feb 23, 2019 1:04 am

Thank you for your reply. I will write to the package authors.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 11 guests