vb6 rewite by XlsIo(C#)

It's my old vb6 code,how can I use XlsIO to rewirte ? Thanks.

ActiveSheet.ChartObjects(1).Activate
ActiveChart.SeriesCollection(1).XValues = "='XXX'!R4C1:R5C1"
ActiveChart.SeriesCollection(1).Values = "='xxx'!R4C3:R5"
ActiveChart.SeriesCollection(2).XValues = "='xxx'!R4C1:R5C1"
ActiveChart.SeriesCollection(2).Values = "='xxx'!R4C6:R5C6"


3 Replies

GM Geetha M Syncfusion Team December 3, 2008 11:48 AM UTC

Hi,

I regret for the delay.

Please refer to the sample in the below link which demonstrates how to insert a chart using Essential XlsIO:

http://websamples.syncfusion.com/samples/XlsIO.Windows/F78098/main.htm

Please let me know if you have any questions.

Regards,
Geetha



PR primo January 25, 2012 02:55 PM UTC

the link http://websamples.syncfusion.com/samples/XlsIO.Windows/F78098/main.htm in the support forum http://www.syncfusion.com/support/forums/xlsio-windows/78098 is broken I need to know what sentences can I use for SeriesCollection and XValues



SR Sridhar Syncfusion Team January 27, 2012 12:08 PM UTC


Hi Primo,

Thank you for using Syncfusion products.

Please go through the following code snippet for the usage of series collection and X - Axis.

Code snippet [C#]:

Code snippet [C#]:
//Get the 1st Chart from the charts Collection
IChartShape shape =sheet.Charts[0];

//Accessing the first series from the Series Collection
shape.Series[0].Name = "Series Name";

//or
//Get the First Series from the Series Collection
IChartSerie serie1 = shape.Series[0];

//Assign the Sereis Range values
serie1.Values = sheet.Range["A1:B5"];

//Access the X-Axis and and set the title for the chart
shape.PrimaryCategoryAxis.Title = "X-Axis";

Please let me know if you require any furthe clarifications.

Thanks,
Sridhar.S


Loader.
Up arrow icon