delphi excel在单元格中的超链接

use*_*070 2 delphi excel

如何使用Delphi从excel表中的某些单元格中提取超链接?

RRU*_*RUZ 6

你可以使用这个Hyperlinks.Address属性

检查此代码

var
  excel : Variant;
begin
 Excel := CreateOleObject('Excel.Application');//Create an excel instance
 try
 Excel.Workbooks.Open('yourexcelfile.xls'); //open the excel workbook
 if Excel.Range['B4', 'B4'].Hyperlinks.Count > 0 then //check if exist hyperlinks in the range
  ShowMessage(Excel.Range['B4', 'B4'].Hyperlinks[1].Address); //show the hyperlink
 finally
 if not VarIsEmpty(Excel) then
  Excel.Quit; //Close the excel instance
 end;
end;
Run Code Online (Sandbox Code Playgroud)