自动filter不工作后C#获取行单元格值
下面的代码不起作用时,过滤行是2号,这意味着它位于列标题下方,只检索列标题,但除了它可以正常工作。
for (int areaId = 1; areaId <= filteredRange.Areas.Count; areaId++) { Range rowRecord = filteredRange.Areas.Item(areaId); object[,] areaValues = rowRecord.Value; CustName = rowRecord.Cells[areaId, 1].Value2; CustOrder= rowRecord.Cells[areaId, 39].Value2; xcelValJobID = (string)areaValues[1, 1]; }