Page 1 sur 1

Interaction entre Notes et Word/Excel

MessagePublié: 05 Août 2003 à 11:22
par Yannick
Salut,Pourriez-vous me dire s'il est possible depuis Lotus Notes, de transférer des documents vers Word ou Excel.Merci, pour vos réponses.

Re: Interaction entre Notes et Word/Excel

MessagePublié: 05 Août 2003 à 11:51
par Stephane Maillard
Bonjour,Voici quelques exemples de pilotage d'Excel à partir de LotusScript, il est possible de rajouter d'autre fonction.Les constantes du début sont toutes les valeurs des types de graphique disponible sous Excel 97, il doit y en avoir d'autre sur les nouvelles versions.Dim XL As VariantConst xl3DArea = -4098Const xl3DAreaStacked = 78Const xl3DAreaStacked100 = 79Const xl3DBarClustered = 60Const xl3DBarStacked = 61Const xl3DBarStacked100 = 62Const xl3DColumn = -4100Const xl3DColumnClustered = 54Const xl3DColumnStacked = 55Const xl3DColumnStacked100 = 56Const xl3DLine = -4101Const xl3DPie = -4102Const xl3DPieExploded = 70Const xlArea = 1Const xlAreaStacked = 76 Const xlAreaStacked100 = 77Const xlBarClustered = 57Const xlBarOfPie = 71Const xlBarStacked = 58Const xlBarStacked100 = 59Const xlBubble = 15Const xlBubble3DEffect = 87Const xlColumnClustered = 51Const xlColumnStacked = 52Const xlColumnStacked100 = 53Const xlConeBarClustered = 102Const xlConeBarStacked = 103 Const xlConeBarStacked100 = 104Const xlConeCol = 105 Const xlConeColClustered = 99 Const xlConeColStacked = 100Const xlConeColStacked100 = 101Const xlCylinderBarClustered = 95 Const xlCylinderBarStacked = 96Const xlCylinderBarStacked100 = 97Const xlCylinderCol = 98Const xlCylinderColClustered = 92Const xlCylinderColStacked = 93Const xlCylinderColStacked100 = 94Const xlDoughnut = -4120Const xlDoughnutExploded = 80 Const xlLine = 4Const xlLineMarkers = 65Const xlLineMarkersStacked = 66Const xlLineMarkersStacked100 = 67Const xlLineStacked = 63 Const xlLineStacked100 = 64Const xlPie = 5Const xlPieExploded = 69Const xlPieOfPie = 68 Const xlPyramidBarClustered = 109Const xlPyramidBarStacked = 110Const xlPyramidBarStacked100 = 111Const xlPyramidCol = 112Const xlPyramidColClustered = 106Const xlPyramidColStacked = 107Const xlPyramidColStacked100 = 108Const xlRadar = -4151Const xlRadarFilled = 82 Const xlRadarMarkers = 81Const xlStockHLC = 88Const xlStockOHLC = 89Const xlStockVHLC = 90Const xlStockVOHLC = 91Const xlSurface = 83Const xlSurfaceTopView = 85Const xlSurfaceTopViewWireframe = 86 Const xlSurfaceWireframe = 84 Const xlXYScatter = -4169Const xlXYScatterLines = 74Const xlXYScatterLinesNoMarkers = 75Const xlXYScatterSmooth = 72Const xlXYScatterSmoothNoMarkers = 73Const xlLocationAsObject = 2Const xlBuiltIn = 21Sub Initialize lanceexcel creergraphiqueEnd SubPublic Sub LanceExcel() Set XL = CreateObject("Excel.Application")End SubPublic Sub NouveauClasseur() Set XL = CreateObject("Excel.Sheet") XL.Application.Visible = True ' Rend Excel visible XL.ActiveSheet.Cells(1, 1).Value = "Bonjours" XL.SaveAs Filename="C:\Test.xls"End SubPublic Sub CreerGraphique() Dim XLGraphique As Variant XL.Workbooks.Add XL.Range("A1").Value = 3 XL.Range("A2").Value = 2 XL.Range("A1:A2").Select%REM Set XLGraphique = XL.Charts.Add XLGraphique.ChartType = xl3DArea XL.Visible = True%END REM Set XLGraphique = XL.Charts.Add With XLGraphique.ApplyCustomType .ChartType = xlBuiltIn .TypeName = "Courbe avec lissage" End With With XLGraphique.Location .Where = xlLocationAsObject .Name = "Feuil1" End With XL.Visible = TrueEnd SubPublic Sub ExcecuteMacro() 'Macro Excel : 'sub ChangementValeur() ' for each c in worksheets("sheet1").range("A1:D10") ' c.value = rnd() * 100 ' next c 'end sub Set XL = GetObject("C:\Test.xls", "excel.sheet") ' Rend Excel visible XL.Application.Visible = True ' Rend le classeur (Workbook) visible XL.Application.Windows("Test.xls").Visible = True XL.Application.Run "ChangementValeur"End SubPublic Sub QuitteExcel() XL.Quit ' Ferme Excel Set XL = Nothing ' Libère la variable objetEnd Sub[%sig%]