[英]Find a number in an Excel sheet's Column A and add the value to Column B
Here is my problem:这是我的问题:
I want to search for a value in column "A" using textbox1 With textbox2 I need the value on the same row but in column "B".我想使用 textbox1 在“A”列中搜索一个值 对于 textbox2 我需要在同一行但在“B”列中的值。
You can user third party library Excel Data Reader , and go through how to use section as well as, how to read data using reader into a C# ADO DataSet.您可以使用第三方库Excel Data Reader ,并了解如何使用 section 以及如何使用 reader 将数据读取到 C# ADO DataSet 中。 Then use row filters on associated DataView with the DataSet.
然后在关联的 DataView 和 DataSet 上使用行过滤器。
DataSet result= reader.AsDataSet(new ExcelDataSetConfiguration()
{
ConfigureDataTable = (_) => new ExcelDataTableConfiguration()
{
UseHeaderRow = true,
ReadHeaderRow = (rowReader) =>
{
}
}
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.