Answers for "how to find the text position in excel in c#"

C#
0

how to find the text position in excel in c#

int rowStart = worksheet.Dimension.Start.Row; 
int rowEnd = worksheet.Dimension.End.Row;

string cellRange = rowStart.ToString() + ":" + rowEnd.ToString();

var searchCell =from cell in worksheet.Cells[cellRange] //you can define your own range of cells for lookup
                 where cell.Value.ToString() == "Total"
                 select cell.Start.Row;

int rowNum = searchCell.First();
Posted by: Guest on March-05-2021
0

how to find the text position in excel in c#

foreach (var worksheetCell in workSheet.Cells)
                {
                    if (worksheetCell.Value != null)
                    {
                        if (worksheetCell.Value.ToString() == "EMP 563")
                        {
                            var worksheetCellFullAddress = worksheetCell.Address;
                            Console.WriteLine(worksheetCellFullAddress);
                        }
                    }

                }
Posted by: Guest on March-05-2021

Code answers related to "how to find the text position in excel in c#"

C# Answers by Framework

Browse Popular Code Answers by Language