Filter particular columns in excel

Hi All,

I need to filter this excel file to extract only the current month’s data. the file has two columns of current year and current month, and there might be another column with same month but different year. I need to extract only the data for current month and year

@sahfarooq

read whole excel without headers

then use a for loop with dt.Columns now inside loop use crrentitem.ColumnName = dt.Rows(1)(currentItem.ColumnName).ToString + "-" + dt.Rows(0)(currentItem.ColumnName).ToString

now column names are of format month-year

so use a filter datatable and select columns tab…select keep and give the month-year column you need…it would retain only that

cheers

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.