Autor Beitrag
JoelH
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Di 06.01.04 13:12 
Ich will ein Diagramm erstellen, das Excelmakro sieht so aus
ausblenden Quelltext
1:
ActiveChart.SetSourceData Source:=Sheets('ueb').Range("A2:B10,O2:Q10"), PlotBy:=xlColumns					

leider bekomme ich den zweiten Bereich nicht übergeben in Delphi

Ich hab
ausblenden Quelltext
1:
app_Excel.ActiveChart.SetSourceData(app_Excel.workbooks[1].sheets[4].Range['A2:B10,O2:Q10'],xlColumns);					


leider verschluckt er sich am Range['A2:B10,O2:Q10']

wenn ich einfach Range['A2:Q10']nehme geht es, leider hab ich dann auch die ganzen Zwischenspalten im Diagramm drin, was ich nicht will !

Wie übergeb ich dass mit der Range richtig ?

_________________
mfg. Joel
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Di 06.01.04 13:53 
Hallo,

ich hab jetzt hier auf Arbeit nicht die Möglichkeit es auszuprobieren und bin mir jetzt auch nicht sicher, aber hast dus mal mit

Range['A2:B10','O2:Q10']

probiert?

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
JoelH Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Di 06.01.04 14:52 
Titel: hmm,
dass ignoriert er einfach, also er schluckt es , es macht aber nicht was es soll.

_________________
mfg. Joel
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Di 06.01.04 15:36 
hat mich jetzt doch interessiert :)
ausblenden Quelltext
1:
2:
ExcelApplication1.Union(ExcelApplication1.Range['A2','B10'],
                        ExcelApplication1.Range['O2','Q10']).select;

hat mir 2 verschiedene Zellbereiche markiert. union gibt auch ein range-object zurück und du könntest auch noch mehr bereiche angeben.
hab mit range rumexperimentiert und es gab nur nichtsagegende OLE-Fehler.

hoffe das geht auch bei deinem setsource

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)