Dim tc As Cells = newWorksheet.Cells
Dim tccell As Cell
tccell = tc.Find("PT9", Nothing, findOptions)

Note: The “tccell” object declared above As “type Cell” contains a string “J1” that I want to retrieve. Using VS2010 when I inspect “tccell” it contains the following: {Aspose.Cells.cell [J1; ValueType: IsString; Value: ABCD]}

How can I extract the value “J1” from “tccell”?

If I try to display tccell: MsgBox(tccell) -->Argument 'Prompt' cannot be converted to type 'String'.

How can I use the result from the Find Method as shown above?

Thanks

有帮助吗?

解决方案

The Cell class has Row and Column properties. If you want those properties in the alphanumeric format, use one of the CellsHelper methods to get that:

string cellname = CellsHelper.CellIndexToName(row, col)

You might also find that the alphanumeric location of the cell already resides in its Name property.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top