Aspose::Cells::WorksheetCollection::Add method
Contents
[
Hide
]WorksheetCollection::Add(SheetType) method
Adds a worksheet to the collection.
int32_t Aspose::Cells::WorksheetCollection::Add(SheetType type)
Parameter | Type | Description |
---|---|---|
type | SheetType | Worksheet type. |
ReturnValue
Worksheet object index.
Examples
Aspose::Cells::Startup();
Workbook workbook;
workbook.GetWorksheets().Add(SheetType::Chart);
Cells cells = workbook.GetWorksheets().Get(0).GetCells();
cells.Get(u"c2").PutValue(5000);
cells.Get(u"c3").PutValue(3000);
cells.Get(u"c4").PutValue(4000);
cells.Get(u"c5").PutValue(5000);
cells.Get(u"c6").PutValue(6000);
ChartCollection charts = workbook.GetWorksheets().Get(1).GetCharts();
int chartIndex = charts.Add(ChartType::Column, 10, 10, 20, 20);
Chart chart = charts.Get(chartIndex);
chart.GetNSeries().Add(u"Sheet1!C2:C6", true);
Aspose::Cells::Cleanup();
See Also
- Class Vector
- Enum SheetType
- Class WorksheetCollection
- Namespace Aspose::Cells
- Library Aspose.Cells for C++
WorksheetCollection::Add() method
Adds a worksheet to the collection.
int32_t Aspose::Cells::WorksheetCollection::Add()
ReturnValue
Worksheet object index.
See Also
- Class Vector
- Class WorksheetCollection
- Namespace Aspose::Cells
- Library Aspose.Cells for C++
WorksheetCollection::Add(const U16String&) method
Adds a worksheet to the collection.
Worksheet Aspose::Cells::WorksheetCollection::Add(const U16String &sheetName)
Parameter | Type | Description |
---|---|---|
sheetName | const U16String& | Worksheet name |
ReturnValue
Worksheet object.
See Also
- Class Worksheet
- Class Vector
- Class U16String
- Class WorksheetCollection
- Namespace Aspose::Cells
- Library Aspose.Cells for C++
WorksheetCollection::Add(const char16_t*) method
Adds a worksheet to the collection.
Worksheet Aspose::Cells::WorksheetCollection::Add(const char16_t *sheetName)
Parameter | Type | Description |
---|---|---|
sheetName | const char16_t* | Worksheet name |
ReturnValue
Worksheet object.
See Also
- Class Worksheet
- Class Vector
- Class WorksheetCollection
- Namespace Aspose::Cells
- Library Aspose.Cells for C++