Autor Beitrag
D. Annies
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Di 14.07.09 06:53 
Hi, Delpher,

bei der folgenden Zeile, die unter D6 Enter funktionierte, meckert Turbo Delphi:

ausblenden Delphi-Quelltext
1:
Excel.range['A1','D1'].select;					


und zwar über das select. 'Nicht deklarierter Bezeichner'
Was ist da los?

Danke für Klärung,
Detlef

_________________
ut vires desint, tamen est laudanda voluntas
Niko S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 566
Erhaltene Danke: 10

Win 7, Ubuntu
Lazarus, Turbo Delphi, Delphu 7 PE
BeitragVerfasst: Di 14.07.09 07:14 
Hm ich kann das nicht reproduzieren.
Also Excel war bei mir TExcelApplication und Select war im Range ebenfalls vorhanden..
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Di 14.07.09 21:55 
Hi, Simak,

nun, bei mir geht's um's Verrecken nicht, er gibt mir auch keine Alternative an. Ich habe jetzt mal Excel : Variant lokal gesetzt, auch keine Änderung.

Weiß nicht, was da los ist - hast du oder jemand anderer noch weitere Tipps?

Gruß, Detlef

_________________
ut vires desint, tamen est laudanda voluntas
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 15.07.09 06:16 
Also bei mir funktioniert es ebenfalls problemlos (in einer neuen sauberen Turbo Delphi Installation im virtuellen PC genau wie in Delphi 2006). :nixweiss:
Ich habe TExcelApplication aufs Formular gelegt, und dann ging der Code problemlos.

Bei dir hört es sich so an als hättest du Excel selbst deklariert. Machst du das über CreateOleObject oder so? Dann könntest du einfach TExcelApplication benutzen, dann geht auch die Codevervollständigung im Editor. ;-)
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mi 15.07.09 07:02 
Ihr wisst aber schon, dass es mindestens 4 Verschiedene TExcelApplication gibt, und über die Zeit einige davon Standard-Delphi-Kompos waren?

Erstmal natürlich die D2006-Standard-Version, jeweils für Excel97/2003XP. Dann verschiedene Importierte OCXe und noch ein paar OLE-Wrapper.

Bin der Meinung, dass eine davon auch Arrays als Funktionen behandelt, also Excel.Range('A1','D1').etc

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Mi 15.07.09 07:20 
Hi,

@Sebastian:
Ja, mit CreateOleObject. Ich wusste von TExcelApplication noch gar nichts. :oops:

@Martok:
Deine Idee mit den runden Klammern war richtig! Kein Meckern mehr!

Jetzt probiere ich aus, ob D6 auch die runden Klammern "mag", und dann ist natürlich die Frage, ob ich TExcelApplication verwende - dann läuft der Code natürlich "auseinander", aber das lässt sich dann wohl (sinnvollerweise) nicht vermeiden; man muss ja sehen, was man will: die alte Optik oder ein neues Erscheinungsbild.

Danke an euch beide,
Detlef

_________________
ut vires desint, tamen est laudanda voluntas