FindStrings

Hi all,

I wanna search for an input string in whole of an excel file but only search in a specified column.

Here is my code:

area = New Aspose.Cells.CellArea
area.StartColumn = 1
area.EndColumn = 1
cell = cells.FindString(inputString, Nothing, area)

But the code above doesn’t work out.

Thanks so much

Hi,

Thanks for considering Aspose.

Please specify your row crieteria (start row ---end row) of the second column from which you want to perform search operation.

E.g.,

area = New Aspose.Cells.CellArea
area.StartRow = 0
area.StartColumn = 1
area.EndRow = 100
area.EndColumn = 1
cell = cells.FindString(inputString, Nothing, area)

Thank you.

Hi,

Thanks for your answering

But actually i don’t know the specified end row and i wanna search the whole file. So if i skip the EndRow criteria, does it affect to my code.

Thanks again.

Hi,

I think you may use Cells.MaxDataRowInColumn() method to get the last row index in a column for your need.

Thank you.