Use ColumnIndexFilter to select specific columns within the imported data. Only the specified columns will be imported to the worksheet.

 public int[] ColumnIndexFilter{ get; set; }
Public Property ColumnIndexFilter() As Integer()

If the length of the specified array is greater than MaxColumns, or exceeds the size of the target area and Truncate is set to true, the smaller value will be used.

Using ColumnIndexFilter overwrites any previous ColumnNameFilter setting.


          //--- Get ColumnIndexFilter
          int[] arrFilter = importProps.ColumnIndexFilter;

          //--- Set ColumnIndexFilter
          importProps.ColumnIndexFilter = arrFilter;
        

          '--- Get ColumnIndexFilter
          Dim arrFilter() As Integer = importProps.ColumnIndexFilter

          '--- Set ColumnIndexFilter
          importProps.ColumnIndexFilter = arrFilter