Ich habe in der Borland Hilfe folgenden Beispielcode für das arbeiten mit Excel gefunden:
<PRE>
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Variant V = Variant::CreateObject("Excel.Application");
V.OlePropertySet("Visible", true);
ShowMessage("Excel has been launched and now is visible");
V.OleFunction("Quit");
V = Unassigned;
}
</PRE>
Der Code funktioniert auch, allerdings habe ich keine weiteren Informationen gefunden, wie man eine Worksheet öffnet oder Werte in Zellen schreibt. Für VB gibt eine Menge Beispielcode wie das funktioniert. Wer kann mir helfen Beispiele für C++ zu finden.
<PRE>
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Variant V = Variant::CreateObject("Excel.Application");
V.OlePropertySet("Visible", true);
ShowMessage("Excel has been launched and now is visible");
V.OleFunction("Quit");
V = Unassigned;
}
</PRE>
Der Code funktioniert auch, allerdings habe ich keine weiteren Informationen gefunden, wie man eine Worksheet öffnet oder Werte in Zellen schreibt. Für VB gibt eine Menge Beispielcode wie das funktioniert. Wer kann mir helfen Beispiele für C++ zu finden.
Comment