Hello all,
I am not sure if this has been done before or not so here goes. Sorry this is not in a traditional SAS 'have', 'want' style* with some starter code. I have many reports going back decades that I want to read back in from excel into SAS. All have a few things in common. Each has a report name in cell A1.
May skip one or more lines/rows and has column heading information broken over two lines not repeated but repeated implied (see image attached) A random number of data/body lines with some type of time series indicator for the first column A, can have per separate tab or excel report a random number of columns (generally less than 40 columns).
then a Notes or footer data.
Note in this example how the first row of the column headings (Row 3) just has Academic, Room, Board, and 'Room & Board Rates' in this case if you select each word/phrase they are in cells for example: Academic (A3), Room (B3), Board (F3), and 'Room & Board Rates' (L3) in each case from for example 'Room' would be repeated in the columns from B3-E3 or B3 to ((L3)-1 column), then Board would be repeated til column K etc..
I have attempted to read this in with a few passes since the data sizes are very small in general I can read in with a few let statements per report and short macros, -custom written per sub-report area, get the report name, the body, the footer, and all its body lines. I can read these correctly except my method has to ignore the column names and just read for example columns as A-M in this case. What I am failing to do with this method is tie it back together with a single line for the column names. At this time does anyone have a solution that would handle reading this data and for example have a column name for column 'C' 'Room_Double' or 'Double_Room'? *I am forgoing that request style since I think my ideas to re-join the composite column headers to the columns have failed I just wanted to start fresh to see what the rest of SAS world might do to solve this read issue. My research on reading excel xlsx files is not very fruitful where the column header is over two lines. TIA -KJ
... View more