Thanks for your reply,
I have tried the newer version, but I am not able to compile successfully, because it needs lot of code changes due to version changes.
So Please help me to fix the issue in current version itself, below given the line of code which we written for Tren formula.
Also attached the output file for Aspose cells for your information.
'------------------------------------------------------------------------------
'Applying the Trend Formula
'------------------------------------------------------------------------------
'Adding a Regression Series only if a valid Trend formula is selected and
' both X and Y Metrics are not Date Types
If stcReportData.ReportSpecification.Trend_Formula <> 0 And Not (stcReportData.X_Metric_Value_DataType.ToUpper.Equals(METRIC_TYPE_DATE) And stcReportData.Y_Metric_Value_DataType.ToUpper.Equals(METRIC_TYPE_DATE)) Then
'Exceute if Trend Formula is a valid numeric value
If IsNumeric(stcReportData.ReportSpecification.Trend_Formula) Then
'Set properties of the Regression Series
ReportChart.NSeries.Add(wsData.Name & "!G2:G" & intLastRow, True) 'The Y Co-ordinate values
ReportChart.NSeries(1).XValues = wsData.Name & "!C2:C" & intLastRow
ReportChart.NSeries(1).Name = "Regression"
ReportChart.NSeries(1).Type = ChartType.Scatter
ReportChart.NSeries(1).MarkerStyle = ChartMarkerType.None
boolOverFlow = False
Select Case stcReportData.ReportSpecification.Trend_Formula
Case 7 'TrendlineType.Logarithmic '7
ReportChart.NSeries(1).TrendLines.Add(TrendlineType.Logarithmic, "Logarithmic")
ReportChart.NSeries(1).TrendLines(0).Order = 2
ReportChart.NSeries(1).TrendLines(0).Style = LineType.Solid
Case 6 'TrendlineType.Linear '6
ReportChart.NSeries(1).TrendLines.Add(TrendlineType.Linear, "Linear")
ReportChart.NSeries(1).TrendLines(0).Order = 2
ReportChart.NSeries(1).TrendLines(0).Style = LineType.Solid
Case 3 'TrendlineType.Polynomial ' 3
ReportChart.NSeries(1).TrendLines.Add(TrendlineType.Polynomial, "Polynomial")
If IsNumeric(stcReportData.ReportSpecification.Trend_Order) Then
ReportChart.NSeries(1).TrendLines(0).Order = stcReportData.ReportSpecification.Trend_Order
ReportChart.NSeries(1).TrendLines(0).Style = LineType.Solid
Else
ReportChart.NSeries(1).TrendLines(0).Order = 2
ReportChart.NSeries(1).TrendLines(0).Style = LineType.Solid
End If
Case 5 'TrendlineType.Exponential
ReportChart.NSeries(1).TrendLines.Add(TrendlineType.Exponential, "Exponential")
ReportChart.NSeries(1).TrendLines(0).Order = 2
ReportChart.NSeries(1).TrendLines(0).Style = LineType.Solid
Case 4 'TrendlineType.Power
ReportChart.NSeries(1).TrendLines.Add(TrendlineType.Power, "Power")
ReportChart.NSeries(1).TrendLines(0).Order = 2
ReportChart.NSeries(1).TrendLines(0).Style = LineType.Solid
Case Else
ReportChart.NSeries(1).TrendLines.Add(stcReportData.ReportSpecification.Trend_Formula, "TrendNameUnknown")
ReportChart.NSeries(1).TrendLines(0).Order = 2
ReportChart.NSeries(1).TrendLines(0).Style = LineType.Solid
End Select
'ReportChart.NSeries(1).TrendLines(0).Period = 0
ReportChart.NSeries(1).TrendLines(0).Forward = 0
ReportChart.NSeries(1).TrendLines(0).Backward = 0
ReportChart.NSeries(1).TrendLines(0).DisplayRSquared = True
'Setting the DataLabel properties
ReportChart.NSeries(1).TrendLines(0).DataLabels.TextFont.Name = "Arial"
ReportChart.NSeries(1).TrendLines(0).DataLabels.TextFont.Size = 9
ReportChart.NSeries(1).TrendLines(0).DataLabels.TextFont.Color = Color.Black
ReportChart.NSeries(1).TrendLines(0).DataLabels.Border.IsVisible = True
ReportChart.NSeries(1).TrendLines(0).DataLabels.Border.Weight = WeightType.HairLine
ReportChart.NSeries(1).TrendLines(0).DataLabels.Border.Style = LineType.Solid
ReportChart.NSeries(1).TrendLines(0).DataLabels.Border.Color = Color.Black
ReportChart.NSeries(1).TrendLines(0).DataLabels.Position = LabelPositionType.Left
Else
'display message "No Trend formula specified for the report
End If
End If
ReportChart.IsLegendShown = False
'When X-Values are Dates and Comparison Components are selected, wrong scales
'are in display starting in 1/1/1900, So the following code id to get around
'this problem. If X-Values are date types then specify the minimum value on
'the X-Axis
'BDFN
stcReportData.X_MinimumDateMinus10Scale = X_MinimumDateMinus10
stcReportData.Y_MinimumDateMinus10Scale = Y_MinimumDateMinus10
If stcReportData.X_Metric_Value_DataType = METRIC_TYPE_DATE Then
'Calculate Minimum date minus 10%
ReportChart.CategoryAxis.MinValue = DataSheetCells(stcReportData.X_MinimumDateMinus10Scale).DoubleValue
'Reset the formula after setting the min value for X Axis, because its not for display
DataSheetCells(stcReportData.X_MinimumDateMinus10Scale).Formula = ""
End If
If stcReportData.Y_Metric_Value_DataType = METRIC_TYPE_DATE Then
'Calculate Minimum date minus 10%
ReportChart.ValueAxis.MinValue = DataSheetCells(stcReportData.Y_MinimumDateMinus10Scale).DoubleValue
'Reset the formula after setting the min value for Y Axis, because its not for display
DataSheetCells(stcReportData.Y_MinimumDateMinus10Scale).Formula = ""
End If
ReportChart.ValueAxis.TickLabels.Font.Name = "Arial"
ReportChart.ValueAxis.TickLabels.Font.Size = 9