Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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();
Comment

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);
                        }
                    }

                }
Comment

PREVIOUS NEXT
Code Example
Csharp :: Options Pattern startup.cs configuration 
Csharp :: xamarin set environment variables 
Csharp :: c# filter datagridview 
Csharp :: display array elemetns to text box c# 
Csharp :: conncet oracle database in c# visual studio 
Csharp :: Unity Object rotation along any axis 
Csharp :: C# top down view player movement 
Csharp :: int model property shows 0 in textbox .net core 
Csharp :: unity collision.impulse 
Csharp :: c# selenium xunit testing 
Csharp :: unity subtract class 
Csharp :: administration 
Csharp :: unity collapse hierarchy script 
Csharp :: structure in c sharp with example 
Csharp :: c# tell if a class is a child or the class itself 
Csharp :: declare multiple variables in for loop C# 
Csharp :: c# recorrer una lista 
Csharp :: w3develops 
Csharp :: textbox gotfocus wpf 
Csharp :: Palindromic substrings 
Csharp :: play sound in sequence unity 
Csharp :: commit help 
Csharp :: long string c# 
Csharp :: c# Write a program to reverse an array or string 
Csharp :: serialize object to json 
Csharp :: get list of months and year between two dates c# 
Csharp :: How to create a class and objects in C# 
Csharp :: register all services microsoft .net core dependency injection container 
Csharp :: error cs1585 unity 
Csharp :: set time on audio source unity 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =