export excel

TeeChart for ActiveX, COM and ASP
Post Reply
sberg
Newbie
Newbie
Posts: 2
Joined: Thu May 27, 2004 4:00 am
Location: italy

export excel

Post by sberg » Tue Sep 14, 2004 11:09 am

Is it possible to export the data in the EXCEL sheet with the legend (not only X,Y) ?

Does someone have already encounter this demand?

Regards,
Stefano

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Sep 14, 2004 2:14 pm

Hi Stefano,

I'm not sure what you refer saying "with the legend", could you please be more specific ?

sberg
Newbie
Newbie
Posts: 2
Joined: Thu May 27, 2004 4:00 am
Location: italy

Post by sberg » Fri Sep 17, 2004 4:10 pm

Hi Pep,

If the name of one Series is "Temperature",
when I export the data in excel I would like that in the title of the column there is " Temperature " and not "Y"

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Sep 20, 2004 5:26 pm

Hi,

this feature is not yet available, but will be included in the next maintenance release (which will be out in 4-5 weeks more or less).
You will be able to change the X and YValues.Name which will be the text that will appear in the xls file.
Sample Code :

Code: Select all

Private Sub Command1_Click()
With TChart1.Export.asXLS
    .IncludeHeader = True
    .IncludeLabels = True
    .SaveToFile "c:\Test.xls"
End With
End Sub

Private Sub Form_Load()
With TChart1
    .AddSeries scPoint
    .Series(0).FillSampleValues (5)
    .Series(0).YValues.Name = "YVal"
End With
End Sub

Repka
Newbie
Newbie
Posts: 7
Joined: Wed Sep 22, 2004 4:00 am
Location: Moscow
Contact:

Post by Repka » Wed Nov 24, 2004 4:20 pm

Hi!
Is this feature now available? our customers really want it :cry:

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Nov 24, 2004 4:37 pm

Hi,

it has been implemented. It will be ready for the next maintenance release which will be out very soon.

Repka
Newbie
Newbie
Posts: 7
Joined: Wed Sep 22, 2004 4:00 am
Location: Moscow
Contact:

Post by Repka » Thu Nov 25, 2004 11:13 am

hi
and what about the same feature in ChartGrid? it will also show
XValues.Name and YValues.Name instead of Text and Y?

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Nov 25, 2004 2:29 pm

Hi,

yes, changing it as above will also take effect in the ChartGrid.

Repka
Newbie
Newbie
Posts: 7
Joined: Wed Sep 22, 2004 4:00 am
Location: Moscow
Contact:

Post by Repka » Fri Dec 17, 2004 1:08 pm

hi
so what about release with this feature implemented?

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Dec 20, 2004 10:37 am

Hi Repka,

the new maintenance release will be posted on our web site this week, if you need urgently plese contact with me directly to pep@steema.com.

Repka
Newbie
Newbie
Posts: 7
Joined: Wed Sep 22, 2004 4:00 am
Location: Moscow
Contact:

Post by Repka » Thu Dec 23, 2004 6:37 pm

hi!
i have downloaded and installed new release.
i thought property Name should work in the same way for XValues and YValues. but it is not so.
for example i do :
.....
.Series(NewSeriesNo).XValues.Name="Week"
.Series(NewSeriesNo).YValues.Name="Demand"
.....
then i export series to Excell ( or view data with ChartGrid). the name of Xvalues of series in the header is still 'Text'. but i want to see
.Series(NewSeriesNo).XValues.Name there.
is there the way to obtain the result i desire?

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Dec 24, 2004 1:44 pm

Hi,

for the moment you can specify a text for the X and YValues, as in the following example :

Code: Select all

Private Sub Form_Load()
With TChart1
    .Aspect.View3D = False
    .AddSeries scLine
    For i = 2 To 20
        .Series(0).AddXY i, Rnd * 100, "aaa", clTeeColor
    Next i
    .Series(0).XValues.Name = "XValues"
    .Series(0).YValues.Name = "YValues"
    
End With
ChartGrid1.Chart = TChart1
With ChartGrid1
    .ShowLabels = False
    .ShowColors = False
End With
End Sub
The text for the labels cannot be changed, we'll add one more property to be able to change it for the next maintenance release.

Post Reply