Hi,
I am trying to insert TeeChart into Excel through OLE. It can be inserted as a BMP or whatever as long as it is displayed in Excel. Also I need to set the dimensions so that it is size: 64 by AP in Excel measurements. Thank you.
Insert TeeChart into Excel through OLE
Hi,
the best way would be to use the TeeChart Pro ActiveX version. It can be inserted into Excel sheets as an object.
I suggest you download the (fully functional) trial version of TeeChart ActiveX version, it includes some Excel examples.
the best way would be to use the TeeChart Pro ActiveX version. It can be inserted into Excel sheets as an object.
I suggest you download the (fully functional) trial version of TeeChart ActiveX version, it includes some Excel examples.
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi myghetto,
The best way to open a Delphi created chart in Excel is exporting the chart to a .tee file in Delphi and load it in Excel. You'll find tutorials on how to import and export charts in both VCL and ActiveX versions program group. Also, examples of TeeChart ActiveX usage in Excel can be found at C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\MSOffice\VBA Excel (Default English installation path).
The best way to open a Delphi created chart in Excel is exporting the chart to a .tee file in Delphi and load it in Excel. You'll find tutorials on how to import and export charts in both VCL and ActiveX versions program group. Also, examples of TeeChart ActiveX usage in Excel can be found at C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\MSOffice\VBA Excel (Default English installation path).
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello everyone,
Steve,
A .tee file should be imported in Excel using TeeChart Pro v7 ActiveX as it is the TeeChart version supported in Excel as a live chart and able to read .tee files. TeeChart Pro v7 ActiveX in Excel is as operative as in a Visual Basic application. Excel examples and tutorials are included with TeeChart Pro v7 ActiveX (evaluation and registered versions).
.tee files are TeeChart natvie template files. You'll find examples in the features demo and tutorials, available at TeeChart's program group. Using them in Excel you'd have a "live" chart as you have in Visual Basic.
Regarding the image, you can export a chart in any of the supported image formats and load it anywhere you want. Using TeeChart VCL then, you'll have to generate an Excel file and load the image into it.
Can you explain how to import a .tee file into Excel ? I do not see a tutorial on how to do that.
What is the advantage of importing a .tee vs an image ? Will the .tee be resizable in Excel for example ?
Steve,
A .tee file should be imported in Excel using TeeChart Pro v7 ActiveX as it is the TeeChart version supported in Excel as a live chart and able to read .tee files. TeeChart Pro v7 ActiveX in Excel is as operative as in a Visual Basic application. Excel examples and tutorials are included with TeeChart Pro v7 ActiveX (evaluation and registered versions).
myghetto,Thanks for the reply. I don't quite understand the .Tee either but I have found the VLX example. I have been playing with the Show Export dialog which saves the chart as a JPEG. Is it possible to just control excel with Delphi and send the picture straight to an exsisting excel template?
.tee files are TeeChart natvie template files. You'll find examples in the features demo and tutorials, available at TeeChart's program group. Using them in Excel you'd have a "live" chart as you have in Visual Basic.
Regarding the image, you can export a chart in any of the supported image formats and load it anywhere you want. Using TeeChart VCL then, you'll have to generate an Excel file and load the image into it.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi,
That is where I am stuck on. I can't find a way to automatically load the image into excel with a press of a button in Delphi. That is what I am trying to achieve. I am using VCL and have tried numerous ways to load it straight into Excel. What did you have in mind about the transferring with VCL cause I have been through the demos and all I found was the export dialog example. Please help. Thank you.
Best regards,
David
That is where I am stuck on. I can't find a way to automatically load the image into excel with a press of a button in Delphi. That is what I am trying to achieve. I am using VCL and have tried numerous ways to load it straight into Excel. What did you have in mind about the transferring with VCL cause I have been through the demos and all I found was the export dialog example. Please help. Thank you.
Best regards,
David
Hi.
Does your exported chart has to be "interactive" or is it enough to have a static image (like jpeg or metafile) ? If first, then you'll have to use ActiveX version. If later, you can easily generate chart image (using specific format), copy it to Clipboard and finally paste it into Excel worksheet. Something like this:
So basically all you're doing is pasting object from Clipboard to Excel worksheet. There are loads of examples avaialable on net (how to create new worksheet, paste object from clipboard, ...).
Another way to do this might be to pass created jpeg image directly to Excel worksheet without using Clipboard. In this case I think you can use TEcelWorkSheet.Shapes.AddPicture method (I haven't tested this approach).
Does your exported chart has to be "interactive" or is it enough to have a static image (like jpeg or metafile) ? If first, then you'll have to use ActiveX version. If later, you can easily generate chart image (using specific format), copy it to Clipboard and finally paste it into Excel worksheet. Something like this:
Code: Select all
uses TeeJPEG;
procedure TForm1.Button1Click(Sender: TObject);
begin
with TJPEGExportFormat.Create do
try
Panel := Chart1;
CopyToClipboard;
// paste image from clipboard to Excel worksheet
// using TExcelWorkSheet Paste method
finally
Free;
end;
end;
Another way to do this might be to pass created jpeg image directly to Excel worksheet without using Clipboard. In this case I think you can use TEcelWorkSheet.Shapes.AddPicture method (I haven't tested this approach).
Marjan Slatinek,
http://www.steema.com
http://www.steema.com