DataTable varTable = getexcel(excelpath);//datatable 数据 string expression;//筛选语句,用and分隔条件片断 string sortOrder;//排序语句 默认升ASC 降desc 用,分隔条件片断 expression = " deviceType<>‘‘ AND deviceAddress<> ‘‘ AND dataType<>‘‘ AND onErrorValue<>‘‘ AND isLock<>‘‘ AND name <> ‘‘ "; sortOrder = "deviceType ASC,deviceAddress ASC"; // Use the Select method to find all rows matching the filter. DataRow[] foundRows =varTable.Select(expression, sortOrder);
时间: 2024-11-13 23:52:19