Friday, February 19, 2010

Excel Export - a Lotus script reference code fragment

Fragment of lotus script code that shall help you get a clear idea of how to export stuffs from lotus notes to excel 

Note: For more info on manipulation using excel objects, you can go through the following site, which holds the complete dom information on excel object:

  Dim excelObj As Variant
    On Error Goto errHandler
    Set excelObj=createObject("Excel.Application")
    Call"C:\Documents and Settings\karthikeyan_a\Desktop\Dashboard.xls")
    Call excelObj.ActiveSheet.ChartObjects("Chart 2").Activate
    Call excelObj.ActiveChart.ChartArea.Copy
    'give values between 0 to 100 and see the difference in the image being produced
    excelObj.ActiveCell.FormulaR1C1 = chartValue
    'give the graph title
    excelObj.ActiveCell.FormulaR1C1 = chartTitle
    Call uidoc.GotoField(rtFieldName)
    Call uidoc.Paste
    Call uidoc.GotoField(rtFieldName)
    Exit Function
    Msgbox Error,,Cstr(Erl) & " Clear Graph function"
    Exit Function

No comments:

Post a Comment