- '-------------récupération des données par copier-coller
- docex.Windows(2).Activate
- docex.ActiveWorkbook.Application.Range("A1:C" & j).Select
- docex.ActiveWorkbook.Application.selection.Copy
-
- '-------------exportation données fichier temporaire sous sigmaplot
- Set exel = New SigmaPlot.Application
- Dim currentNotebook
- Set currentNotebook = exel.Notebooks.Add
- exel.ActiveDocument.CurrentDataItem.Paste
- exel.ActiveDocument.CurrentDataItem.Open
- sim = True
- '-------------on nomme les colonnes
- Dim s
- Set s = exel.ActiveDocument.CurrentDataItem.DataTable.NamedRanges.Add("treatment", 0, 0, 1, -1, True)
- Set s = exel.ActiveDocument.CurrentDataItem.DataTable.NamedRanges.Add("time(min)", 1, 0, 1, -1, True)
- Set s = exel.ActiveDocument.CurrentDataItem.DataTable.NamedRanges.Add("concentration(" & unit & ")", 2, 0, 1, -1, True)
- '-------------création du graphes linéaire
- exel.ActiveDocument.CurrentDataItem.Open
- '----sélection des colonnes (B0:B30;C0:C30)
- Dim columnsperplot()
- ReDim columnsperplot(2, 1)
- columnsperplot(0, 0) = 1
- columnsperplot(1, 0) = 0
- columnsperplot(2, 0) = 30
- columnsperplot(0, 1) = 2
- columnsperplot(1, 1) = 0
- columnsperplot(2, 1) = 30
- Dim plotcolumncountarray()
- ReDim plotcolumncountarray(0)
- plotcolumncountarray(0) = 2
- '---------ajout d'une feuille graphique
- exel.ActiveDocument.NotebookItems.Add (CT_GRAPHICPAGE)
-
- Dim graphpage
- Set graphpage = exel.ActiveDocument.NotebookItems("Graph PAGE 1")
- graphpage = exel.ActiveDocument.CurrentPageItem.CreateWizardGraph("Line and Scatter Plot", "Simple Straight Line", "XY Pair", columnsperplot, plotcolumncountarray, "Worksheet Columns")
- '----------------création d'un graph linéaire avec points, simple
- exel.Application.Visible = True
'-------------récupération des données par copier-coller
docex.Windows(2).Activate
docex.ActiveWorkbook.Application.Range("A1:C" & j).Select
docex.ActiveWorkbook.Application.selection.Copy
'-------------exportation données fichier temporaire sous sigmaplot
Set exel = New SigmaPlot.Application
Dim currentNotebook
Set currentNotebook = exel.Notebooks.Add
exel.ActiveDocument.CurrentDataItem.Paste
exel.ActiveDocument.CurrentDataItem.Open
sim = True
'-------------on nomme les colonnes
Dim s
Set s = exel.ActiveDocument.CurrentDataItem.DataTable.NamedRanges.Add("treatment", 0, 0, 1, -1, True)
Set s = exel.ActiveDocument.CurrentDataItem.DataTable.NamedRanges.Add("time(min)", 1, 0, 1, -1, True)
Set s = exel.ActiveDocument.CurrentDataItem.DataTable.NamedRanges.Add("concentration(" & unit & ")", 2, 0, 1, -1, True)
'-------------création du graphes linéaire
exel.ActiveDocument.CurrentDataItem.Open
'----sélection des colonnes (B0:B30;C0:C30)
Dim columnsperplot()
ReDim columnsperplot(2, 1)
columnsperplot(0, 0) = 1
columnsperplot(1, 0) = 0
columnsperplot(2, 0) = 30
columnsperplot(0, 1) = 2
columnsperplot(1, 1) = 0
columnsperplot(2, 1) = 30
Dim plotcolumncountarray()
ReDim plotcolumncountarray(0)
plotcolumncountarray(0) = 2
'---------ajout d'une feuille graphique
exel.ActiveDocument.NotebookItems.Add (CT_GRAPHICPAGE)
Dim graphpage
Set graphpage = exel.ActiveDocument.NotebookItems("Graph PAGE 1")
graphpage = exel.ActiveDocument.CurrentPageItem.CreateWizardGraph("Line and Scatter Plot", "Simple Straight Line", "XY Pair", columnsperplot, plotcolumncountarray, "Worksheet Columns")
'----------------création d'un graph linéaire avec points, simple
exel.Application.Visible = True