Lotuscript export to excel question

I created a LS action that exports data from a view into excel and then creates a chart. I am trying to create a custom chart as in the snippet below. I commented the 'TypeName = “Line - Column on 2 Axes” out because I can’t get this part to work. As is, it defaults to creating the Standard Type Column chart and not a Custom Type. Anyone run into this? I have converted this from a VB macro. Thanks.

excelRange =“A1:D6”

With wsheet.Range("B10:I30")			

	Set ChartObj = wsheet.ChartObjects.Add(.left, .top, .width, .height)	

End With



With ChartObj.Chart

	Print "I am entering chart creation"

	.ApplyCustomType ChartType = xlBuiltIn 'TypeName = "Line - Column on 2 Axes"

	Print "applied chart type"

	.SetSourceData wsheet.Range(excelRange), 3

	.SeriesCollection.NewSeries

	.SeriesCollection

	.SeriesCollection(1).Name = "NCR Chart"

	.SeriesCollection(1).XValues = "=Pareto!R2C1:R6C1".......

End With

Subject: Lotuscript export to excel question

You will need to convert all the VB constants to numbers or declare them, so xlBuiltIn is actually a number. Just google for Office constants lotusscript (or do a search here) and youwill find them.

Hope this helps

Subject: RE: Lotuscript export to excel question

I know that xlBuiltIn is constant 21 but this doesn’t seem to work. If I assign that constant another number, say 56, it creates the chart properly, but I want to use the custom charts. Below is the code I tweaked to try and get this to work:

With ChartObj.Chart

	Print "I am entering chart creation"

	.ChartType = 21

	.TypeName = myType 

'declared as Const myType=“Line-Column on 2 Axes”

I have tried using ApplyCustomType.ChartType=21, which does not work.

Any other suggestions? Thanks.