Add

Add(SheetType)

Ajoute une feuille de calcul à la collection.

public int Add(SheetType type)
ParamètreTaperLa description
typeSheetTypeType de feuille de calcul.

Return_Value

Worksheet indice d’objet.

Exemples

[C#]
Workbook workbook = new Workbook();
workbook.Worksheets.Add(SheetType.Chart);
Cells cells = workbook.Worksheets[0].Cells;
cells["c2"].PutValue(5000);
cells["c3"].PutValue(3000);
cells["c4"].PutValue(4000);
cells["c5"].PutValue(5000);
cells["c6"].PutValue(6000);
ChartCollection charts = workbook.Worksheets[1].Charts;
int chartIndex = charts.Add(ChartType.Column, 10,10,20,20);
Chart chart = charts[chartIndex];
chart.NSeries.Add("Sheet1!C2:C6", true);

[Visual Basic]
Dim workbook As Workbook =  New Workbook() 
workbook.Worksheets.Add(SheetType.Chart)
Dim cells As Cells = workbook.Worksheets(0).Cells 
cells("c2").PutValue(5000)
cells("c3").PutValue(3000)
cells("c4").PutValue(4000)
cells("c5").PutValue(5000)
cells("c6").PutValue(6000)
Dim charts As ChartCollection = workbook.Worksheets(1).Charts
Dim chartIndex As Integer = charts.Add(ChartType.Column,10,10,20,20) 
Dim chart As Chart = charts(chartIndex) 
chart.NSeries.Add("Sheet1!C2:C6", True)

Voir également


Add()

Ajoute une feuille de calcul à la collection.

public int Add()

Return_Value

Worksheet indice d’objet.

Voir également


Add(string)

Ajoute une feuille de calcul à la collection.

public Worksheet Add(string sheetName)
ParamètreTaperLa description
sheetNameStringNom de la feuille de calcul

Return_Value

Worksheet objet.

Voir également