02-12-2014 08:46 AM
I am reading the Excel Files from the directory using the following code. It works fine. But I have several sheets in those execl files.
For instance for each excel file based on the products has 2 sheets, P2_abc, P3_abc, P2_xyz, P3_zyz, P2_mnk, P3_mnk and so on.
Can anybody help me how to code Proc Import part so that I can read the sheets using macro?
%do i=2 %to 3;
PROC IMPORT OUT= P&i_&prod datafile="&drv.\&&read1&i" dbms=excel2007 REPLACE; sheet="P&i_&prod" ; getnames=yes;
Once the Above reading the file is done then I want to set all the data together as below.
set P2_abc P3_abc P2_xyz P3_xyz ..........;
I would appreciate any help in this.