Import excel data with empty cols

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

loulouviews
Posts: 60
Joined: Wed Mar 11, 2015 2:19 am

Import excel data with empty cols

Postby loulouviews » Fri Jan 12, 2018 4:10 am

Hi,

I want to import data from Excel files (.xlsx) into EViews.
I can't change the excel files and I can't know in advance the number of columns and rows (or in other words, I want my prg to work for any number of rows and columns).
I am currently using

Code: Select all

import(t=excelxml) %file range=%page colhead=1 namepos=first @smpl %debData %lastData

My problem is that some Excel files contains empty columns between columns with data and the EViews parser stop when encountering such empty column, leaving columns on the right not imported.
Is there any way to circumvent this problem ?

Many thanks


PS : I have attached an Excel file which I can't import.
Attachments
building_total_sa_nace2.xlsx
(889.18 KiB) Downloaded 12 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11811
Joined: Tue Sep 16, 2008 5:38 pm

Re: Import excel data with empty cols

Postby EViews Gareth » Fri Jan 12, 2018 9:06 am

You're kind of out of luck. You either have to tell EViews both the upper left corner and bottom right corner of the data, or only the upper left and have no blank rows/columns.
Follow us on Twitter @IHSEViews

loulouviews
Posts: 60
Joined: Wed Mar 11, 2015 2:19 am

Re: Import excel data with empty cols

Postby loulouviews » Tue Jan 16, 2018 9:58 am

Ok :?
Thank you for answer !


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 10 guests