How do I get an entire column in used range?

后端 未结 3 1944
花落未央
花落未央 2020-12-11 01:46

I am trying to get a column, but limiting it to used range...

public static Excel.Application App = new Excel.Application();
public static Excel.Workbook WB;         


        
3条回答
  •  感情败类
    2020-12-11 02:13

    You can use

    sheet.UsedRange.Columns[6, Type.Missing].Rows.Count
    

    or this

    sheet.UsedRange.Columns["F:F", Type.Missing].Rows.Count
    

提交回复
热议问题