com.aspose.cells
Classes 
AboveAverage
AbstractCalculationEngine
AbstractCalculationMonitor
AbstractGlobalizationSettings
AbstractInterruptMonitor
AbstractTextLoadOptions
ActiveXControl
ActiveXControlBase
ArcShape
Area
AutoFilter
AutoFitterOptions
AutomaticFill
AutoNumberedBulletValue
Axis
AxisBins
BaseShapeGuide
Bevel
Border
BorderCollection
BuiltInDocumentPropertyCollection
Bullet
BulletValue
Button
CalculationCell
CalculationData
CalculationOptions
Cell
CellArea
Cells
CellsColor
CellsDataTableFactory
CellsDrawing
CellsException
CellsFactory
CellsHelper
CellWatch
CellWatchCollection
CharacterBulletValue
Chart
ChartArea
ChartCollection
ChartDataTable
ChartFrame
ChartGlobalizationSettings
ChartPoint
ChartPointCollection
ChartShape
ChartTextFrame
CheckBox
CheckBoxActiveXControl
CheckBoxCollection
CollectionBase
Color
ColorFilter
ColorHelper
ColorScale
Column
ColumnCollection
ComboBox
ComboBoxActiveXControl
CommandButtonActiveXControl
Comment
CommentCollection
CommentShape
ConditionalFormattingCollection
ConditionalFormattingIcon
ConditionalFormattingIconCollection
ConditionalFormattingResult
ConditionalFormattingValue
ConditionalFormattingValueCollection
ConnectionParameter
ConnectionParameterCollection
ContentTypeProperty
ContentTypePropertyCollection
CopyOptions
CustomDocumentPropertyCollection
CustomFilter
CustomFilterCollection
CustomGeometry
CustomImplementationFactory
CustomProperty
CustomPropertyCollection
CustomXmlPart
CustomXmlPartCollection
CustomXmlShape
DataBar
DataBarBorder
DataLabels
DataSorter
DataSorterKey
DataSorterKeyCollection
DateTime
DateTimeGroupItem
DBConnection
DefaultStyleSettings
DeleteOptions
DialogBox
DifSaveOptions
DigitalSignature
DigitalSignatureCollection
DisplayUnitLabel
DocumentProperty
DocumentPropertyCollection
DocxSaveOptions
DrawObject
DrawObjectEventHandler
DropBars
DxfCollection
DynamicFilter
Encoding
ErrorBar
ErrorCheckOption
ErrorCheckOptionCollection
ExportObjectEvent
ExportRangeToJsonOptions
ExportTableOptions
ExternalConnection
ExternalConnectionCollection
ExternalLink
ExternalLinkCollection
FileFontSource
FileFormatInfo
FileFormatUtil
Fill
FillFormat
FilterColumn
FilterColumnCollection
FindOptions
Floor
FolderFontSource
Font
FontConfigs
FontSetting
FontSettingCollection
FontSourceBase
Format3D
FormatCondition
FormatConditionCollection
FormulaParseOptions
FormulaSettings
Geometry
GlobalizationSettings
GlowEffect
GradientFill
GradientStop
GradientStopCollection
GroupBox
GroupFill
GroupShape
HeaderFooterCommand
HorizontalPageBreak
HorizontalPageBreakCollection
HtmlLoadOptions
HtmlSaveOptions
Hyperlink
HyperlinkCollection
IconFilter
IconSet
ImageActiveXControl
ImageFormat
ImageOrPrintOptions
ImageSaveOptions
ImportTableOptions
IndividualFontConfigs
InsertOptions
InterruptMonitor
JsonLayoutOptions
JsonLoadOptions
JsonSaveOptions
JsonUtility
Label
LabelActiveXControl
Legend
LegendEntry
LegendEntryCollection
License
Line
LineFormat
LineShape
ListBox
ListBoxActiveXControl
ListColumn
ListColumnCollection
ListObject
ListObjectCollection
LoadFilter
LoadOptions
MarkdownSaveOptions
Marker
MemoryFontSource
MetadataOptions
Metered
MsoFillFormat
MsoFillFormatHelper
MsoFormatPicture
MsoLineFormat
MsoLineFormatHelper
MsoTextFrame
MultipleFilterCollection
Name
NameCollection
NegativeBarFormat
NoneBulletValue
NoneFill
OdsCellField
OdsCellFieldCollection
OdsLoadOptions
OdsPageBackground
OdsSaveOptions
OleObject
OleObjectCollection
OoxmlSaveOptions
Outline
Oval
PageEndSavingArgs
PageSavingArgs
PageSetup
PageStartSavingArgs
PaneCollection
PasteOptions
PatternFill
PdfBookmarkEntry
PdfSaveOptions
PdfSecurityOptions
PicFormatOption
Picture
PictureBulletValue
PictureCollection
PivotField
PivotFieldCollection
PivotFilter
PivotFilterCollection
PivotFormatCondition
PivotFormatConditionCollection
PivotItem
PivotItemCollection
PivotOptions
PivotPageFields
PivotTable
PivotTableCollection
PlotArea
PptxSaveOptions
ProtectedRange
ProtectedRangeCollection
Protection
QueryTable
QueryTableCollection
RadioButton
RadioButtonActiveXControl
Range
RangeCollection
RectangleShape
ReferredArea
ReferredAreaCollection
ReflectionEffect
ReplaceOptions
Revision
RevisionAutoFormat
RevisionCellChange
RevisionCellComment
RevisionCellMove
RevisionCollection
RevisionCustomView
RevisionDefinedName
RevisionFormat
RevisionInsertDelete
RevisionInsertSheet
RevisionLog
RevisionLogCollection
RevisionMergeConflict
RevisionQueryTable
RevisionRenameSheet
Row
RowCollection
SaveOptions
Scenario
ScenarioCollection
ScenarioInputCell
ScenarioInputCellCollection
ScrollBar
ScrollBarActiveXControl
Series
SeriesCollection
SeriesLayoutProperties
ShadowEffect
Shape
ShapeCollection
ShapeFormat
ShapeGuide
ShapeGuideCollection
ShapePath
ShapePathCollection
ShapePathPoint
ShapePathPointCollection
ShapePropertyCollection
ShapeSegmentPath
ShapeSegmentPathCollection
ShapeTextAlignment
SheetPrintingPreview
SheetRender
SignatureLine
Slicer
SlicerCache
SlicerCacheItem
SlicerCacheItemCollection
SlicerCollection
SmartArtShape
SmartTag
SmartTagCollection
SmartTagOptions
SmartTagProperty
SmartTagPropertyCollection
SmartTagSetting
SolidFill
Sparkline
SparklineCollection
SparklineGroup
SparklineGroupCollection
SpinButtonActiveXControl
Spinner
SpreadsheetML2003SaveOptions
StreamProviderOptions
Style
StyleFlag
SubtotalSetting
SvgSaveOptions
SxRng
TableStyle
TableStyleCollection
TableStyleElement
TableStyleElementCollection
TableToRangeOptions
TextBox
TextBoxActiveXControl
TextBoxCollection
TextEffectFormat
TextOptions
TextParagraph
TextParagraphCollection
TextTabStop
TextTabStopCollection
TextureFill
ThemeColor
ThreadedComment
ThreadedCommentAuthor
ThreadedCommentAuthorCollection
ThreadedCommentCollection
ThreeDFormat
TickLabelItem
TickLabels
TilePicOption
Timeline
TimelineCollection
Title
ToggleButtonActiveXControl
Top10
Top10Filter
Trendline
TrendlineCollection
TxtLoadOptions
TxtSaveOptions
UnionRange
UnknownControl
Validation
ValidationCollection
VbaModule
VbaModuleCollection
VbaProject
VbaProjectReference
VbaProjectReferenceCollection
VerticalPageBreak
VerticalPageBreakCollection
VmlShapeGuide
Walls
WarningInfo
WebExtension
WebExtensionBinding
WebExtensionBindingCollection
WebExtensionCollection
WebExtensionProperty
WebExtensionPropertyCollection
WebExtensionReference
WebExtensionReferenceCollection
WebExtensionShape
WebExtensionTaskPane
WebExtensionTaskPaneCollection
WebQueryConnection
Workbook
WorkbookDesigner
WorkbookMetadata
WorkbookPrintingPreview
WorkbookRender
WorkbookSettings
Worksheet
WorksheetCollection
WriteProtection
XlsbSaveOptions
XlsSaveOptions
XmlColumnProperty
XmlDataBinding
XmlLoadOptions
XmlMap
XmlMapCollection
XmlSaveOptions
XpsSaveOptions
Interfaces 
ICellsDataTable
ICustomFunction
ICustomParser
IExportObjectListener
IFilePathProvider
IPageSavingCallback
ISmartMarkerCallBack
IStreamProvider
IWarningCallback
LightCellsDataHandler
LightCellsDataProvider
Constants 
AccessCacheOptions
ActiveXPersistenceType
AutoFillType
AutoFitMergedCellsType
AutoFitWrappedTextType
AutoShapeType
AxisType
BackgroundMode
BackgroundType
Bar3DShapeType
BevelPresetType
BevelType
BorderType
BubbleSizeRepresents
BuiltinStyleType
BulletType
CalcModeType
CalculationPrecisionStrategy
CategoryType
CellBorderType
CellValueFormatStrategy
CellValueType
ChartLineFormattingType
ChartMarkerType
ChartSplitType
ChartTextDirectionType
ChartType
CheckValueType
ColorDepth
ColorType
CommentTitleType
ConnectionDataSourceType
ConnectionParameterType
ConsolidationFunction
ControlBorderType
ControlCaptionAlignmentType
ControlListStyle
ControlMatchEntryType
ControlMousePointerType
ControlPictureAlignmentType
ControlPicturePositionType
ControlPictureSizeMode
ControlScrollBarType
ControlScrollOrientation
ControlSpecialEffectType
ControlType
CopyFormatType
CountryCode
CredentialsMethodType
CrossType
DataBarAxisPosition
DataBarBorderType
DataBarFillType
DataBarNegativeColorType
DataLabelShapeType
DataLabelsSeparatorType
DataLablesSeparatorType
DateTimeGroupingType
DefaultEditLanguage
DirectoryType
DisplayDrawingObjects
DisplayUnitType
DrawObjectEnum
DropButtonStyle
DynamicFilterType
EmfRenderSetting
EncryptionType
ErrorBarDisplayType
ErrorBarType
ErrorCheckType
ExceptionType
ExternalLinkType
FileFormatType
FillPattern
FillPictureType
FillType
FilterOperatorType
FilterType
FontSchemeType
FontSourceType
FontUnderlineType
FormatConditionType
FormatConditionValueType
FormatSetType
FormattingType
GradientColorType
GradientDirectionType
GradientFillType
GradientPresetType
GradientStyleType
GridlineType
HeaderFooterCommandType
HtmlCrossType
HtmlExportDataOptions
HtmlFormatHandlingType
HtmlHiddenColDisplayType
HtmlHiddenRowDisplayType
HtmlLinkTargetType
IconSetType
ImageType
InputMethodEditorMode
LabelPositionType
LegendPositionType
LightRigDirectionType
LightRigType
LineCapType
LineJoinType
LineSpaceSizeType
LineType
LoadDataFilterOptions
LoadFormat
LookAtType
LookInType
MapChartLabelLayout
MapChartProjectionType
MapChartRegionType
MemorySetting
MetadataType
MirrorType
MsoArrowheadLength
MsoArrowheadStyle
MsoArrowheadWidth
MsoDrawingType
MsoLineDashStyle
MsoLineStyle
MsoPresetTextEffect
MsoPresetTextEffectShape
NameScopeType
NumberCategoryType
OdsCellFieldType
OdsGeneratorType
OdsPageBackgroundGraphicPositionType
OdsPageBackgroundGraphicType
OdsPageBackgroundType
OLEDBCommandType
OoxmlCompliance
OoxmlCompressionType
OperatorType
PageLayoutAlignmentType
PageOrientationType
PaneStateType
PaperSizeType
ParameterType
PasteOperationType
PasteType
PdfCompliance
PdfCompressionCore
PdfCustomPropertiesExport
PdfFontEncoding
PdfOptimizationType
PivotConditionFormatRuleType
PivotConditionFormatScopeType
PivotFieldDataDisplayFormat
PivotFieldSubtotalType
PivotFieldType
PivotFilterType
PivotGroupByType
PivotItemPosition
PivotMissingItemLimitType
PivotTableAutoFormatType
PivotTableStyleType
PlacementType
PlotDataByType
PlotEmptyCellsType
PresetCameraType
PresetMaterialType
PresetShadowType
PresetWordArtStyle
PrintCommentsType
PrintErrorsType
PrintingPageType
PrintOrderType
PrintSizeType
PropertyType
ProtectionType
QuartileCalculationType
ReConnectionMethodType
RectangleAlignmentType
ReflectionEffectType
RenameStrategy
ResourceLoadingType
RevisionActionType
RevisionType
SaveFormat
SelectionType
ShapeAnchorType
ShapeLockType
ShapePathType
SheetType
ShiftType
ShowDropButtonType
SlicerCacheCrossFilterType
SlicerCacheItemSortType
SlicerStyleType
SmartTagShowType
SortOnType
SortOrder
SparklineAxisMinMaxType
SparklinePresetStyleType
SparklineType
SqlDataType
StyleModifyFlag
TableDataSourceType
TableStyleElementType
TableStyleType
TargetModeType
TextAlignmentType
TextAutonumberScheme
TextCapsType
TextCrossType
TextDirectionType
TextFontAlignType
TextNodeType
TextOrientationType
TextOverflowType
TextStrikeType
TextTabAlignmentType
TextureType
TextVerticalType
ThemeColorType
TickLabelPositionType
TickMarkType
TiffCompression
TimePeriodType
TimeUnit
TotalsCalculation
TrendlineType
TxtLoadStyleStrategy
TxtValueQuoteType
UpdateLinksType
ValidationAlertType
ValidationType
VbaModuleType
VbaProjectReferenceType
ViewType
VisibilityType
WarningType
WebExtensionStoreType
WeightType
XAdESType

com.aspose.cells
Class WorksheetCollection

java.lang.Object
  extended by CollectionBase
      extended by com.aspose.cells.WorksheetCollection
All Implemented Interfaces:
java.lang.Iterable

public class WorksheetCollection 
extends CollectionBase

Encapsulates a collection of Worksheet objects.

Example:

Workbook workbook = new Workbook();

WorksheetCollection sheets = workbook.getWorksheets();

//Add a worksheet
sheets.add();

//Change the name of a worksheet
sheets.get(0).setName("First Sheet");

//Set the active sheet to the second worksheet
sheets.setActiveSheetIndex(1);


Property Getters/Setters Summary
intgetActiveSheetIndex()
voidsetActiveSheetIndex(int)
           Represents the index of active worksheet when the spreadsheet is opened.
java.lang.StringgetActiveSheetName()
voidsetActiveSheetName(java.lang.String)
           Represents the name of active worksheet when the spreadsheet is opened.
BuiltInDocumentPropertyCollectiongetBuiltInDocumentProperties()
           Returns a DocumentProperty collection that represents all the built-in document properties of the spreadsheet.
intgetCount()→ inherited from com.aspose.cells.CollectionBase
          
CustomDocumentPropertyCollectiongetCustomDocumentProperties()
           Returns a DocumentProperty collection that represents all the custom document properties of the spreadsheet.
DxfCollectiongetDxfs()
           Gets the master differential formatting records.
ExternalLinkCollectiongetExternalLinks()
           Represents external links in a workbook.
booleanisRefreshAllConnections()
voidsetRefreshAllConnections(boolean)
           Indicates whether refresh all connections on opening file in MS Excel.
NameCollectiongetNames()
           Gets the collection of all the Name objects in the spreadsheet.
java.lang.ObjectgetOleSize()
voidsetOleSize(java.lang.Object)
           Gets and Sets displayed size when Workbook file is used as an Ole object.
RevisionLogCollectiongetRevisionLogs()
           Represents revision logs.
TableStyleCollectiongetTableStyles()
           Gets TableStyles object.
ThreadedCommentAuthorCollectiongetThreadedCommentAuthors()
           Gets the list of threaded comment authors.
WebExtensionCollectiongetWebExtensions()
           Gets the list of task panes.
WebExtensionTaskPaneCollectiongetWebExtensionTaskPanes()
           Gets the list of task panes.
XmlMapCollectiongetXmlMaps()
voidsetXmlMaps(XmlMapCollection)
           Gets and sets the XML maps in the workbook.
Worksheetget(int)
           Gets the Worksheet element at the specified index.
Worksheetget(java.lang.String)
           Gets the Worksheet element with the specified name.
 
Method Summary
intadd()
           Adds a worksheet to the collection.
intadd(int type)
           Adds a worksheet to the collection.
intadd(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
Worksheetadd(java.lang.String sheetName)
           Adds a worksheet to the collection.
intaddCopy(int sheetIndex)
           Adds a worksheet to the collection and copies data from an existed worksheet.
intaddCopy(java.lang.String sheetName)
           Adds a worksheet to the collection and copies data from an existed worksheet.
voidclear()
           Clear all worksheets.
voidclearPivottables()
           Clears pivot tables from the spreadsheet.
booleancontains(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
RangecreateRange(java.lang.String address, int sheetIndex)
           Creates a Range object from an address of the range.
UnionRangecreateUnionRange(java.lang.String address, int sheetIndex)
           Creates a Range object from an address of the range.
com.aspose.cells.Range[]getNamedRanges()
           Gets all pre-defined named ranges in the spreadsheet.
com.aspose.cells.Range[]getNamedRangesAndTables()
           Gets all pre-defined named ranges in the spreadsheet.
RangegetRangeByName(java.lang.String rangeName)
           Gets Range object by pre-defined name.
RangegetRangeByName(java.lang.String rangeName, int currentSheetIndex, boolean includeTable)
           Gets Range by pre-defined name or table's name
WorksheetgetSheetByCodeName(java.lang.String codeName)
           Gets the worksheet by the code name.
intindexOf(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
Worksheetinsert(int index, int sheetType)
           Insert a worksheet.
Worksheetinsert(int index, int sheetType, java.lang.String sheetName)
           Insert a worksheet.
java.util.Iteratoriterator()→ inherited from com.aspose.cells.CollectionBase
          
voidrefreshPivotTables()
           Refreshes all the PivotTables in the WorksheetCollection.
java.lang.StringregisterAddInFunction(int id, java.lang.String functionName)
           Adds addin function into the workbook
intregisterAddInFunction(java.lang.String addInFile, java.lang.String functionName, boolean lib)
           Adds addin function into the workbook
voidremoveAt(int index)
           Removes the element at a specified index.
voidremoveAt(java.lang.String name)
           Removes the element at a specified name.
voidsetOleSize(int startRow, int endRow, int startColumn, int endColumn)
           Sets displayed size when Workbook file is used as an Ole object.
voidsortNames()
           Sorts the defined names.
voidswapSheet(int sheetIndex1, int sheetIndex2)
           Swaps the two sheets.
 

Property Getters/Setters Detail

getWebExtensionTaskPanes

public WebExtensionTaskPaneCollection getWebExtensionTaskPanes()
Gets the list of task panes.

getWebExtensions

public WebExtensionCollection getWebExtensions()
Gets the list of task panes.

getThreadedCommentAuthors

public ThreadedCommentAuthorCollection getThreadedCommentAuthors()
Gets the list of threaded comment authors.

isRefreshAllConnections/setRefreshAllConnections

public boolean isRefreshAllConnections() / public void setRefreshAllConnections(boolean value)
Indicates whether refresh all connections on opening file in MS Excel.

getNames

public NameCollection getNames()
Gets the collection of all the Name objects in the spreadsheet.

getActiveSheetName/setActiveSheetName

public java.lang.String getActiveSheetName() / public void setActiveSheetName(java.lang.String value)
Represents the name of active worksheet when the spreadsheet is opened.

getActiveSheetIndex/setActiveSheetIndex

public int getActiveSheetIndex() / public void setActiveSheetIndex(int value)
Represents the index of active worksheet when the spreadsheet is opened. Sheet index is zero based.

getDxfs

public DxfCollection getDxfs()
Gets the master differential formatting records.

getXmlMaps/setXmlMaps

public XmlMapCollection getXmlMaps() / public void setXmlMaps(XmlMapCollection value)
Gets and sets the XML maps in the workbook.

getBuiltInDocumentProperties

public BuiltInDocumentPropertyCollection getBuiltInDocumentProperties()
Returns a DocumentProperty collection that represents all the built-in document properties of the spreadsheet. A new property cannot be added to built-in document properties list. You can only get a built-in property and change its value. The following is the built-in properties name list:

Title

Subject

Author

Keywords

Comments

Template

Last Author

Revision Number

Application Name

Last Print Date

Creation Date

Last Save Time

Total Editing Time

Number of Pages

Number of Words

Number of Characters

Security

Category

Format

Manager

Company

Number of Bytes

Number of Lines

Number of Paragraphs

Number of Slides

Number of Notes

Number of Hidden Slides

Number of Multimedia Clips

Example:

Workbook workbook = new Workbook();
DocumentProperty doc = workbook.getWorksheets().getBuiltInDocumentProperties().get("Author");
doc.setValue("John Smith");

getCustomDocumentProperties

public CustomDocumentPropertyCollection getCustomDocumentProperties()
Returns a DocumentProperty collection that represents all the custom document properties of the spreadsheet.

Example:

Workbook workbook = new Workbook();
workbook.getWorksheets().getCustomDocumentProperties().add("Checked by", "Jane");

getOleSize/setOleSize

public java.lang.Object getOleSize() / public void setOleSize(java.lang.Object value)
Gets and Sets displayed size when Workbook file is used as an Ole object. Null means no ole size setting.

getExternalLinks

public ExternalLinkCollection getExternalLinks()
Represents external links in a workbook.

getTableStyles

public TableStyleCollection getTableStyles()
Gets TableStyles object.

getRevisionLogs

public RevisionLogCollection getRevisionLogs()
Represents revision logs.

getCount

→ inherited from com.aspose.cells.CollectionBase
public int getCount()

get

public Worksheet get(int index)
Gets the Worksheet element at the specified index.
Parameters:
index - The zero based index of the element.
Returns:
The element at the specified index.

get

public Worksheet get(java.lang.String sheetName)
Gets the Worksheet element with the specified name.
Parameters:
sheetName - Worksheet name
Returns:
The element with the specified name.

Method Detail

setOleSize

public void setOleSize(int startRow, int endRow, int startColumn, int endColumn)
Sets displayed size when Workbook file is used as an Ole object. This method is generally used to adjust display size in ppt file or doc file.
Parameters:
startRow - Start row index.
endRow - End row index.
startColumn - Start column index.
endColumn - End column index.

clearPivottables

public void clearPivottables()
Clears pivot tables from the spreadsheet.

refreshPivotTables

public void refreshPivotTables()
                       throws java.lang.Exception
Refreshes all the PivotTables in the WorksheetCollection.

createRange

public Range createRange(java.lang.String address, int sheetIndex)
Creates a Range object from an address of the range.
Parameters:
address - The address of the range.
sheetIndex - The sheet index.
Returns:
A Range object

createUnionRange

public UnionRange createUnionRange(java.lang.String address, int sheetIndex)
Creates a Range object from an address of the range.
Parameters:
address - The address of the range.
sheetIndex - The sheet index.
Returns:
A Range object

getSheetByCodeName

public Worksheet getSheetByCodeName(java.lang.String codeName)
Gets the worksheet by the code name.
Parameters:
codeName - Worksheet code name.
Returns:
The element with the specified code name.

sortNames

public void sortNames()
Sorts the defined names. If you create a large amount of named ranges in the Excel file, please call this method after all named ranges are created and before saving

insert

public Worksheet insert(int index, int sheetType)
Insert a worksheet.
Parameters:
index - The sheet index
sheetType - A SheetType value. The sheet type.
Returns:
Returns an inserted worksheet.

insert

public Worksheet insert(int index, int sheetType, java.lang.String sheetName)
Insert a worksheet.
Parameters:
index - The sheet index
sheetType - A SheetType value. The sheet type.
sheetName - The sheet name.
Returns:
Returns an inserted worksheet.

add

public int add(int type)
Adds a worksheet to the collection.
Parameters:
type - A SheetType value. Worksheet type.
Returns:
Worksheet object index.

Example:

Workbook workbook = new Workbook();
workbook.getWorksheets().add(SheetType.CHART);
   Cells cells = workbook.getWorksheets().get(0).getCells();
   cells.get("c2").putValue(5000);
   cells.get("c3").putValue(3000);
   cells.get("c4").putValue(4000);
   cells.get("c5").putValue(5000);
   cells.get("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("Sheet1!C2:C6", true);

swapSheet

public void swapSheet(int sheetIndex1, int sheetIndex2)
Swaps the two sheets.
Parameters:
sheetIndex1 - The first worksheet.
sheetIndex2 - The second worksheet.

add

public int add()
Adds a worksheet to the collection.
Returns:
Worksheet object index.

add

public Worksheet add(java.lang.String sheetName)
Adds a worksheet to the collection.
Parameters:
sheetName - Worksheet name
Returns:
Worksheet object.

registerAddInFunction

public int registerAddInFunction(java.lang.String addInFile, java.lang.String functionName, boolean lib)
Adds addin function into the workbook
Parameters:
addInFile - the file contains the addin functions
functionName - the addin function name
lib - whether the given addin file is in the directory or sub-directory of Workbook Add-In library. This flag takes effect and makes difference when given addInFile is of relative path: true denotes the path is relative to Add-In library and false denotes the path is relative to this Workbook.
Returns:
ID of the data which contains given addin function

registerAddInFunction

public java.lang.String registerAddInFunction(int id, java.lang.String functionName)
Adds addin function into the workbook
Parameters:
id - ID of the data which contains addin functions, can be got by the first call of registerAddInFunction(java.lang.String, java.lang.String, boolean) for the same addin file.
functionName - the addin function name
Returns:
URL of the addin file which contains addin functions

removeAt

public void removeAt(java.lang.String name)
Removes the element at a specified name.
Parameters:
name - The name of the element to remove.

removeAt

public void removeAt(int index)
Removes the element at a specified index.
Parameters:
index - The index value of the element to remove.

clear

public void clear()
Clear all worksheets. A workbook must contains a worksheet.

addCopy

public int addCopy(java.lang.String sheetName)
           throws java.lang.Exception
Adds a worksheet to the collection and copies data from an existed worksheet.
Parameters:
sheetName - Name of source worksheet.
Returns:
Worksheet object index.

addCopy

public int addCopy(int sheetIndex)
           throws java.lang.Exception
Adds a worksheet to the collection and copies data from an existed worksheet.
Parameters:
sheetIndex - Index of source worksheet.
Returns:
Worksheet object index.

getRangeByName

public Range getRangeByName(java.lang.String rangeName)
Gets Range object by pre-defined name.
Parameters:
rangeName - Name of range.
Returns:
Range object.

Returns null if the named range does not exist.

getRangeByName

public Range getRangeByName(java.lang.String rangeName, int currentSheetIndex, boolean includeTable)
Gets Range by pre-defined name or table's name
Parameters:
rangeName - Name of range or table's name.
currentSheetIndex - The sheet index. -1 represents global .
includeTable - Indicates whether checking all tables.
Returns:

getNamedRanges

public com.aspose.cells.Range[] getNamedRanges()
Gets all pre-defined named ranges in the spreadsheet.
Returns:
An array of Range objects. If the defined Name's reference is external or has multiple ranges, no Range object will be returned for this Name.

Returns null if the named range does not exist.

getNamedRangesAndTables

public com.aspose.cells.Range[] getNamedRangesAndTables()
Gets all pre-defined named ranges in the spreadsheet.
Returns:
An array of Range objects.

Returns null if the named range does not exist.

iterator

→ inherited from com.aspose.cells.CollectionBase
public java.util.Iterator iterator()

contains

→ inherited from com.aspose.cells.CollectionBase
public boolean contains(java.lang.Object value)
Reserved for internal use.

add

→ inherited from com.aspose.cells.CollectionBase
public int add(java.lang.Object value)
Reserved for internal use.

indexOf

→ inherited from com.aspose.cells.CollectionBase
public int indexOf(java.lang.Object value)
Reserved for internal use.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.