Как осуществить поиск ячейки по её значению?
Falk0ner, вс, 06/07/2008 - 15:35.
{ ... }
var
Rnge: OleVariant;
{ ... }
Rnge := WS.Cells;
Rnge := Rnge.Find('Is this text on the sheet?');
if Pointer(IDispatch(Rnge)) <> nil then
{The text was found somewhere, so colour it pink}
Rnge.Interior.Color := clFuchsia;
var
Rnge: OleVariant;
{ ... }
Rnge := WS.Cells;
Rnge := Rnge.Find('Is this text on the sheet?');
if Pointer(IDispatch(Rnge)) <> nil then
{The text was found somewhere, so colour it pink}
Rnge.Interior.Color := clFuchsia;
Взято с Delphi Knowledge Base: http://www.baltsoft.com/
Отправить комментарий