你说的是所有设置了CellType为CheckBoxCellType的单元格吧。
目前能想到的方法就是遍历行列中的单元格去判断
- for(int r=0;r< workbook.Worksheets[0].Rows.Count;r++)
- {
- for (int c = 0; c < workbook.Worksheets[0].Columns.Count; c++)
- {
- if (workbook.Worksheets[0].Cells[r, c].CellType is CheckBoxCellType)
- {
- MessageBox.Show(r + "-" + c);
- }
- }
- }
复制代码 |