AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein Excel.Interop OLE -> Problem beim Hyperlink lesen
Thema durchsuchen
Ansicht
Themen-Optionen

Excel.Interop OLE -> Problem beim Hyperlink lesen

Offene Frage von "shmia"
Ein Thema von Master_BB · begonnen am 25. Sep 2008 · letzter Beitrag vom 13. Jul 2010
Antwort Antwort
Master_BB

Registriert seit: 17. Mai 2003
285 Beiträge
 
Delphi 7 Professional
 
#1

Re: Excel.Interop OLE -> Problem beim Hyperlink lesen

  Alt 2. Feb 2009, 15:11
auf die schnelle würd ich meinen das bei 0 angefangen wird zu zählen
daher probiers mal mit
link:=ExcelApp.ActiveCell.Hyperlinks[0];
Wenn das Meer unruhig ist und der Wind die Wellen treibt, erfreut es, vom Strand aus die Mühen eines Anderen zu beobachten.
  Mit Zitat antworten Zitat
buchsbaum

Registriert seit: 21. Jul 2009
9 Beiträge
 
#2

AW: Excel.Interop OLE -> Problem beim Hyperlink lesen

  Alt 13. Jul 2010, 08:41
Hallo

Ich habe ebenfalls versucht, die Hyperlinks aus einer Excel-Datei auszulesen. Dazu habe ich den oben genannten Code verwendet:

AHypLink := FExcelWorkbook.ActiveSheet.Hyperlinks[1];

Leider weiß ich nicht genau, welchen Datentyp ich für AHypLink definieren muss.
  Mit Zitat antworten Zitat
shmia

Registriert seit: 2. Mär 2004
5.508 Beiträge
 
Delphi 5 Professional
 
#3

AW: Excel.Interop OLE -> Problem beim Hyperlink lesen

  Alt 13. Jul 2010, 09:09
Leider weiß ich nicht genau, welchen Datentyp ich für AHypLink definieren muss.
Delphi-Quellcode:
var
  AHypLink : OleVariant;
Mit AHypLink.Address müsstest du an den Link als String kommen.

Hier noch das Interface dazu:
Code:
 interface IHyperlink : IDispatch {
        [propget, helpcontext(0x00010094)]
        HRESULT _stdcall Application([out, retval] Application** RHS);
        [propget, helpcontext(0x00010095)]
        HRESULT _stdcall Creator([out, retval] XlCreator* RHS);
        [propget, helpcontext(0x00010096)]
        HRESULT _stdcall Parent([out, retval] IDispatch** RHS);
        [propget, helpcontext(0x0001006e)]
        HRESULT _stdcall Name([out, retval] BSTR* RHS);
        [propget, helpcontext(0x000100c5)]
        HRESULT _stdcall Range([out, retval] Range** RHS);
        [propget, helpcontext(0x0001062e)]
        HRESULT _stdcall Shape([out, retval] Shape** RHS);
        [propget, helpcontext(0x000105bf)]
        HRESULT _stdcall SubAddress([out, retval] BSTR* RHS);
        [propput, helpcontext(0x000105bf)]
        HRESULT _stdcall SubAddress([in] BSTR RHS);
        [propget, helpcontext(0x000100ec)]
        HRESULT _stdcall Address([out, retval] BSTR* RHS);
        [propput, helpcontext(0x000100ec)]
        HRESULT _stdcall Address([in] BSTR RHS);
        [propget, helpcontext(0x0001006c)]
        HRESULT _stdcall Type([out, retval] long* RHS);
        [helpcontext(0x000105c4)]
        HRESULT _stdcall AddToFavorites();
        [helpcontext(0x00010075)]
        HRESULT _stdcall Delete();
        [helpcontext(0x00010650)]
        HRESULT _stdcall Follow(
                        [in, optional] VARIANT NewWindow,
                        [in, optional] VARIANT AddHistory,
                        [in, optional] VARIANT ExtraInfo,
                        [in, optional] VARIANT Method,
                        [in, optional] VARIANT HeaderInfo);
        [propget, helpcontext(0x0001075b)]
        HRESULT _stdcall EmailSubject([out, retval] BSTR* RHS);
        [propput, helpcontext(0x0001075b)]
        HRESULT _stdcall EmailSubject([in] BSTR RHS);
        [propget, helpcontext(0x00010759)]
        HRESULT _stdcall ScreenTip([out, retval] BSTR* RHS);
        [propput, helpcontext(0x00010759)]
        HRESULT _stdcall ScreenTip([in] BSTR RHS);
        [propget, helpcontext(0x0001075a)]
        HRESULT _stdcall TextToDisplay([out, retval] BSTR* RHS);
        [propput, helpcontext(0x0001075a)]
        HRESULT _stdcall TextToDisplay([in] BSTR RHS);
        [helpcontext(0x0001075c)]
        HRESULT _stdcall CreateNewDocument(
                        [in] BSTR Filename,
                        [in] VARIANT_BOOL EditNow,
                        [in] VARIANT_BOOL Overwrite);
    };
Andreas
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:50 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz