Aspose.Cells Monitor for interruption requests in all time-consuming operations. Indicates whether interruption is requested for current operation. If true then current operation will be interrupted. Implementation should perform fast and efficient check here, otherwise it may become another bottleneck for the procedure. When procedure is interrupted, whether terminate the procedure quietly or throw an Exception. Default is false, that is, when is true, a with code will be thrown. Represents the auto fill type. Copies the value and format of the source area to the target area Automatically fills the target area with the value and format. Copies only the format of the source area to the target area, Extend the value in the source area to the target area in the form of a series and copy format to the target area. Copies only the value of the source area to the target area, Represents the settings of advanced filter. Gets the list range of this advanced filter. Gets the criteria range of this advanced filter. Gets the range where copying the resut of this advanced filter to. Represents autofiltering for the specified worksheet. [C#] //Creating a file stream containing the Excel file to be opened //Instantiating a Workbook object Workbook workbook = new Workbook("template.xlsx"); //Accessing the first worksheet in the Excel file Worksheet worksheet = workbook.Worksheets[0]; //Creating AutoFilter by giving the cells range of the heading row worksheet.AutoFilter.Range = "A1:B1"; //Filtering columns with specified values worksheet.AutoFilter.Filter(1, "Bananas"); //Saving the modified Excel file. workbook.Save("output.xls"); [Visual Basic] 'Creating a file stream containing the Excel file to be opened 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook("template.xlsx") 'Accessing the first worksheet in the Excel file Dim worksheet As Worksheet = workbook.Worksheets(0) 'Creating AutoFilter by giving the cells range of the heading row worksheet.AutoFilter.Range = "A1:B1" 'Filtering columns with specified values Worksheet.AutoFilter.Filter(1, "Bananas") 'Saving the modified Excel file workbook.Save("output.xls") Gets the data sorter. Sets the range to which the specified AutoFilter applies. Row index. Start column index. End column Index. Gets the where the this AutoFilter applies to. the area this filter applies to Gets the where the specified AutoFilter applies to. Whether refresh the applied range. For the applied range of auto filter, the last row may change when cells data changes. If this flag is true, then the last row of the range will be re-calculated according to current cells data. the area this filter applies to Represents the range to which the specified AutoFilter applies. Adds a filter for a filter column. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). The specified criteria (a string; for example, "101"). It only can be null or be one of the cells' value in this column. MS Excel 2007 supports multiple selection in a filter column. Adds a date filter. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). The grouping type The year. The month. The day. The hour. The minute. The second. If DateTimeGroupingType is Year, only the param year effects. If DateTiemGroupingType is Month, only the param year and month effect. Removes a date filter. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). The grouping type The year. The month. The day. The hour. The minute. The second. If DateTimeGroupingType is Year, only the param year effects. If DateTiemGroupingType is Month, only the param year and month effect. Removes a filter for a filter column. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). The specified criteria (a string; for example, "101"). It only can be null or be one of the cells' value in this column. Filters a list with specified criteria. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). The specified criteria (a string; for example, "101"). Aspose.Cells will remove all other filter setting on this field as Ms Excel 97-2003. Filter the top 10 item in the list The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). Indicates whether filter from top or bottom Indicates whether the items is percent or count The item count Adds a dynamic filter. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). Dynamic filter type. Adds a font color filter. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). The object. Adds a fill color filter. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). The background pattern type. The foreground color. The background color. Adds an icon filter. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). The icon set type. The icon id. Only supports to add the icon filter. Not supports checking which row is visible if the filter is icon filter. Match all blank cell in the list. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). Match all not blank cell in the list. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). Filters a list with a custom criteria. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). The filter operator type The custom criteria Filters a list with custom criteria. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). The filter operator type The custom criteria The filter operator type The custom criteria Unhide all rows. Remove the specific filter. The specific filter index Refresh auto filters to hide or unhide the rows. Returns all hidden rows' indexes. Gets all hidden rows' indexes. If true, hide the filtered rows. Returns all hidden rows indexes. Indicates whether the AutoFilter button for this column is visible. Gets the collection of the filter columns. Represents filtering the range by color. Whether filter by the cell's fill color. True: cell's fill color; False: cell's font color. Gets the color of this filter. Represents the custom filter. Gets and sets the filter operator type. Gets and sets the criteria. Sets the filter criteria. filter operator type filter criteria value Represents the custom filters. Constructs new instance. Indicates whether the two criteria have an "and" relationship. Gets the custom filter in the specific index. The index. Specifies how to group dateTime values. Group by day. Group by hour. Group by Minute. Group by Month. Group by Second. Group by Year. Represents the datetime's group setting. Gets the min value. Gets and sets the group type. Gets and sets the year of the grouped date time. Gets and sets the month of the grouped date time. Gets and sets the day of the grouped date time. Gets and sets the hour of the grouped date time. Gets and sets the minute of the grouped date time. Gets and sets the second of the grouped date time. Represents the dynamic filter. Gets and sets the dynamic filter type. Gets and sets the dynamic filter value. Gets and sets the dynamic filter max value. Dynamic filter type. Shows values that are above average. Shows values that are below average. Shows last month's dates. Shows last quarter's dates. Shows last week's dates. Shows last year's dates. Shows the dates that are in January, regardless of year. Shows the dates that are in October, regardless of year. Shows the dates that are in November, regardless of year. Shows the dates that are in December, regardless of year. Shows the dates that are in February, regardless of year. Shows the dates that are in March, regardless of year. Shows the dates that are in April, regardless of year. Shows the dates that are in May, regardless of year. Shows the dates that are in June, regardless of year. Shows the dates that are in July, regardless of year. Shows the dates that are in August, regardless of year. Shows the dates that are in September, regardless of year. Shows next month's dates. Shows next quarter's dates. Shows next week's dates. Shows next year's dates. None. Shows the dates that are in the 1st quarter, regardless of year. Shows the dates that are in the 2nd quarter, regardless of year. Shows the dates that are in the 3rd quarter, regardless of year. Shows the dates that are in the 4th quarter, regardless of year. Shows this month's dates. Shows this quarter's dates. Shows this week's dates. Shows this year's dates. Shows today's dates. Shows tomorrow's dates. Shows the dates between the beginning of the year and today, inclusive. Shows yesterday's dates. Represents the category of the filter. No Filter. Caption Filter. Number Value Filter. Date Value Filter. Top10 Value Filter. Represents a filter for a single column. The Filter object is a member of the Filters collection Indicates whether the AutoFilter button for this column is visible. Gets and sets the condition of filtering data. Gets and sets the type fo filtering data. Gets and sets the column offset in the range. A collection of Filter objects that represents all the filters in an autofiltered range. Returns a single Filter object from a collection. Gets object at the special field. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). Returns object. Custom Filter operator type. Represents LessOrEqual operator. Represents LessThan operator. Represents Equal operator. Represents GreaterThan operator. Represents NotEqual operator. Represents GreaterOrEqual operator. Represents no comparison. Begins with the text. Ends with the text. Contains the text. Not contains the text. Not begins with the text. Not ends with the text. The filter type. Filter by fill color of the cell. Custom filter type. Dynamic filter type. When multiple values are chosen to filter by, or when a group of date values are chosen to filter by, this element groups those criteria together. Filter by icon of conditional formatting. Top 10 filter. No filter. Represents icon filter. Gets and sets which icon set is used in the filter criteria. Gets and sets Zero-based index of an icon in an icon set. Represents the multiple filter collection. Constructs one new instance. Indicates whether to filter by blank. DateTimeGroupItem or a simple object. Adds string filter. The filter data. Represents the top 10 filter. Indicates whether it's top filter. Indicates whether the items is percent. Gets and sets the items of the filter. Represents the type of auto fitting merged cells. Ignore merged cells. Default. Only expands the height of the first row. Only expands the height of the last row. Expands the height of each row. Represents all auto fitter options. Gets or sets default edit language. It may display/render different layouts for text paragraph when different edit languages is set. Default is . Indicates whether auto fit row height when the cells is merged in a row. The default value is false. NOTE: This member is now obsolete. Instead, please use AutoFitterOptions.AutoFitMergedCellsType property, instead. This property will be removed 12 months later since December 2018. Aspose apologizes for any inconvenience you may have experienced. Gets and set the type of auto fitting row height of merged cells. Excel defaults to ignore merged cells when fitting the row height, so Aspose.Cells works as MS Excel default. Please set this type to change the way of auto fitting row height of merged cells. Indicates whether only fit the rows which height are not customed. Ignores the hidden rows/columns. Gets and sets the max row height(in unit of Point) when autofitting rows. Gets and sets the type of auto fitting wrapped text. Gets and sets the formatted strategy. The default value is CellStyle for performance. Indicates whether fit for rendering purpose. Represents the type of auto fitting wrapped text. Works as MS Excel. Auto fit width with the longest paragraph. Represents the mode type of calculating formulas. Only sets for MS Excel. Encapsulates the object that represents a single Workbook cell. [C#] Workbook excel = new Workbook(); Cells cells = excel.Worksheets[0].Cells; //Put a string into a cell Cell cell = cells[0, 0]; cell.PutValue("Hello"); string first = cell.StringValue; //Put an integer into a cell cell = cells["B1"]; cell.PutValue(12); int second = cell.IntValue; //Put a double into a cell cell = cells[0, 2]; cell.PutValue(-1.234); double third = cell.DoubleValue; //Put a formula into a cell cell = cells["D1"]; cell.Formula = "=B1 + C1"; //Put a combined formula: "sum(average(b1,c1), b1)" to cell at b2 cell = cells["b2"]; cell.Formula = "=sum(average(b1,c1), b1)"; //Set style of a cell Style style = cell.GetStyle(); //Set background color style.BackgroundColor = Color.Yellow; //Set format of a cell style.Font.Name = "Courier New"; style.VerticalAlignment = TextAlignmentType.Top; cell.SetStyle(style); [Visual Basic] Dim excel as Workbook = new Workbook() Dim cells as Cells = exce.Worksheets(0).Cells 'Put a string into a cell Dim cell as Cell = cells(0, 0) cell.PutValue("Hello") Dim first as String = cell.StringValue //Put an integer into a cell cell = cells("B1") cell.PutValue(12) Dim second as Integer = cell.IntValue //Put a double into a cell cell = cells(0, 2) cell.PutValue(-1.234) Dim third as Double = cell.DoubleValue //Put a formula into a cell cell = cells("D1") cell.Formula = "=B1 + C1" //Put a combined formula: "sum(average(b1,c1), b1)" to cell at b2 cell = cells("b2") cell.Formula = "=sum(average(b1,c1), b1)" //Set style of a cell Dim style as Style = cell.GetStyle() //Set background color style.BackgroundColor = Color.Yellow //Set font of a cell style.Font.Name = "Courier New" style.VerticalAlignment = TextAlignmentType.Top cell.SetStyle(style) Calculates the formula of the cell. Options for calculation Gets the parent worksheet. Puts a boolean value into the cell. Puts an integer value into the cell. Input value Puts a double value into the cell. Input value Puts a value into the cell, if appropriate the value will be converted to other data type and cell's number format will be reset. Input value True: converted to other data type if appropriate. True: set the number format to cell's style when converting to other data type Puts a string value into the cell and converts the value to other data type if appropriate. Input value True: converted to other data type if appropriate. Puts a string value into the cell. Input value Puts a DateTime value into the cell. Input value Setting a DateTime value for a cell dose not means the cell will be formatted as date time automatically. DateTime value was maintained as numeric value in the data model of both ms excel and Aspose.Cells. Whether the numeric value will be taken as the numeric value itself or date time depends on the number format applied on this cell. If this cell has not been formatted as date time, it will be displayed as a numeric value even though what you input is DateTime. This example shows how to set DateTime value to a cell and make it be displayed as date time. [C#] Workbook excel = new Workbook(); Cells cells = excel.Worksheets[0].Cells; //Put date time into a cell Cell cell = cells[0, 0]; cell.PutValue(new DateTime(2023, 5, 15)); Style style = cell.GetStyle(false); style.Number = 14; cell.SetStyle(style); Puts a value into the cell. Puts a value into the cell. Gets the DateTime value contained in the cell. Puts an object value into the cell. input value Gets row number (zero based) of the cell. Cell row number Gets column number (zero based) of the cell. Represents if the specified cell contains formula. Represents cell value type. Gets the name of the cell. A cell name includes its column letter and row number. For example, the name of a cell in row 0 and column 0 is A1. Checks if the value of this cell is an error. Also applies to formula cell to check whether the calculated result is an error. Indicates whether the value of this cell is numeric(int, double and datetime) Also applies to formula cell to check the calculated result Gets the string value by specific formatted strategy. The formatted strategy. Gets the string value contained in the cell. If the type of this cell is string, then return the string value itself. For other cell types, the formatted string value (formatted with the specified style of this cell) will be returned. The formatted cell value is same with what you can get from excel when copying a cell as text(such as copying cell to text editor or exporting to csv). Gets cell's value as string without any format. NOTE: This method is now obsolete. Instead, User should get the value object and format it according to the value type and the specific requirement. This property will be removed 12 months later since December 2020. Aspose apologizes for any inconvenience you may have experienced. Represents the category type of this cell's number formatting. When cell's formatting pattern is combined with conditional formatting patterns, then the returned type is corresponding to the part which is used for current value of this cell. For example, if the formatting pattern for this cell is "#,##0;(#,##0);"-";@", then when cell's value is numeric and not 0, the returned type is ; When cell's value is 0 or not numeric value, the returned type is . Gets the formatted string value of this cell by cell's display style. Gets the integer value contained in the cell. Gets the double value contained in the cell. Gets the float value contained in the cell. Gets the boolean value contained in the cell. Gets the width of the value in unit of pixels. Gets the height of the value in unit of pixels. Gets the display style of this cell. display style of this cell Same with using for . That is, this method will check and adjust top/bottom/left/right borders of this cell according to the style() of its adjacent cells, but do not check the merged cells, and do not check the display style of adjacent cells. Gets the display style of this cell. Indicates whether checking borders of merged cells. display style of this cell If the specified flag is false, then it is same with . Otherwise it is same with using | for . Gets the display style of this cell. Indicates which borders need to be checked and adjusted according to the borders of adjacent cells. display style of this cell If this cell is also affected by other settings such as conditional formatting, list objects, etc., then the display style may be different from .
For flags of adjusting borders according to adjacent cells, // denote whether check and combine the bottom/top/right/left borders of the left/right/top/bottom cells adjacent to this one.

For performance and compatibility consideration, some enums are used to denote some special operations:

/ denote whether check and combine the bottom/right border of merged cells to this one.

(that is, both and have been set) denotes check and combine borders from the display style of adjacent cells.

Please note, checking borders/styles of adjacent cells, especially the display styles, is time-consumed process. If there is no need to get the borders for the returned style, using to disable the process of adjacent cells will give better performance. When getting borders of adjacent cells from styles defined on those cells only(without setting ), the performance also may be better because checking the display style of one cell is time-consumed too.
Gets format conditions which applies to this cell. Returns object Gets the cell style. Style object. To change the style of the cell, please call Cell.SetStyle() method after modifying the returned style object. This method is same with with true value for the parameter. If checkBorders is true, check whether other cells' borders will effect the style of this cell. Check other cells' borders Style object. Sets the cell style. The cell style. If the border settings are changed, the border of adjust cells will be updated too. Apply the changed property of style to the cell. The cell style. True, only overwriting formatting which is explicitly set. Apply the cell style based on flags. The cell style. The style flag. Indicates whether this cell has custom style settings(different from the default one inherited from corresponding row, column, or workbook). Gets cell's shared style index in the style pool. Gets or sets a formula of the . A formula string always begins with an equal sign (=). And please always use comma(,) as parameters delimiter, such as "=SUM(A1, E1, H2)". [C#] Workbook excel = new Workbook(); Cells cells = excel.Worksheets[0].Cells; cells["B6"].Formula = "=SUM(B2:B5, E1) + sheet1!A1"; [Visual Basic] Dim excel As Workbook = New Workbook() Dim cells As Cells = excel.Worksheets(0).Cells cells("B6").Formula = "=SUM(B2:B5, E1) + sheet1!A1" Get the locale formatted formula of the cell. Gets or sets a R1C1 formula of the . Set the formula and the value(calculated result) of the formula. The formula. The value(calculated result) of the formula. Set the formula and the value(calculated result) of the formula. The formula. Options for parsing the formula. Get the formula of this cell. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. the formula of this cell. Set the formula and the value of the formula. The formula. Whether the formula is R1C1 formula. Whether the formula is locale formatted. The value of the formula. NOTE: This class is now obsolete. Instead, please use Cell.SetFormula(string,FormulaParseOptions,object). This property will be removed 12 months later since December 2019. Aspose apologizes for any inconvenience you may have experienced. Set the formula and the value(calculated result) of the formula. The formula. Options for parsing the formula. The value(calculated result) of the formula. Sets an array formula to a range of cells. Array formula. Number of rows to populate result of the array formula. Number of columns to populate result of the array formula. whether the formula is R1C1 formula whether the formula is locale formatted NOTE: This class is now obsolete. Instead, please use Cell.SetArrayFormula(string,int,int,FormulaParseOptions). This property will be removed 12 months later since December 2019. Aspose apologizes for any inconvenience you may have experienced. Sets an array formula(legacy array formula entered via CTRL+SHIFT+ENTER in ms excel) to a range of cells. Array formula. Number of rows to populate result of the array formula. Number of columns to populate result of the array formula. Sets an array formula to a range of cells. Array formula. Number of rows to populate result of the array formula. Number of columns to populate result of the array formula. Options for parsing the formula. Sets an array formula to a range of cells. Array formula. Number of rows to populate result of the array formula. Number of columns to populate result of the array formula. Options for parsing the formula. values for those cells with given array formula Sets a formula to a range of cells. Shared formula. Number of rows to populate the formula. Number of columns to populate the formula. whether the formula is R1C1 formula whether the formula is locale formatted NOTE: This class is now obsolete. Instead, please use Cell.SetSharedFormula(string,int,int,FormulaParseOptions). This property will be removed 12 months later since December 2019. Aspose apologizes for any inconvenience you may have experienced. Sets shared formulas to a range of cells. Shared formula. Number of rows to populate the formula. Number of columns to populate the formula. Sets shared formulas to a range of cells. Shared formula. Number of rows to populate the formula. Number of columns to populate the formula. Options for parsing the formula. Sets shared formulas to a range of cells. Shared formula. Number of rows to populate the formula. Number of columns to populate the formula. Options for parsing the formula. values for those cells with given shared formula Indicates whether this cell contains an external link. Only applies when the cell is a formula cell. Gets all references appearing in this cell's formula. Collection of all references appearing in this cell's formula.
  • Returns null if this is not a formula cell.
  • All references appearing in this cell's formula will be returned no matter they are referenced or not while calculating. For example, although cell A2 in formula "=IF(TRUE,A1,A2)" is not used while calculating, it is still taken as the formula's precedents.
  • To get those references which influence the calculation only, please use .
[C#] Workbook workbook = new Workbook(); Cells cells = workbook.Worksheets[0].Cells; cells["A1"].Formula = "=B1+SUM(B1:B10)+[Book1.xls]Sheet1!A1"; ReferredAreaCollection areas = cells["A1"].GetPrecedents(); for (int i = 0; i < areas.Count; i++) { ReferredArea area = areas[i]; StringBuilder stringBuilder = new StringBuilder(); if (area.IsExternalLink) { stringBuilder.Append("["); stringBuilder.Append(area.ExternalFileName); stringBuilder.Append("]"); } stringBuilder.Append(area.SheetName); stringBuilder.Append("!"); stringBuilder.Append(CellsHelper.CellIndexToName(area.StartRow, area.StartColumn)); if (area.IsArea) { stringBuilder.Append(":"); stringBuilder.Append(CellsHelper.CellIndexToName(area.EndRow, area.EndColumn)); } Console.WriteLine(stringBuilder.ToString()); } [Visual Basic] Dim workbook As Workbook = New Workbook() Dim cells As Cells = workbook.Worksheets(0).Cells cells("A1").Formula = "= B1 + SUM(B1:B10) + [Book1.xls]Sheet1!A1" Dim areas As ReferredAreaCollection = cells("A1").GetPrecedents() For i As Integer = 0 To areas.Count - 1 Dim area As ReferredArea = areas(i) Dim stringBuilder As StringBuilder = New StringBuilder() If (area.IsExternalLink) Then stringBuilder.Append("[") stringBuilder.Append(area.ExternalFileName) stringBuilder.Append("]") End If stringBuilder.Append(area.SheetName) stringBuilder.Append("!") stringBuilder.Append(CellsHelper.CellIndexToName(area.StartRow, area.StartColumn)) If (area.IsArea) Then stringBuilder.Append(":") stringBuilder.Append(CellsHelper.CellIndexToName(area.EndRow, area.EndColumn)) End If Console.WriteLine(stringBuilder.ToString()) Next
Get all cells whose formula references to this cell directly. Indicates whether check formulas in other worksheets
  • If one reference containing this cell appears in one cell's formula, that cell will be taken as the dependent of this cell, no matter the reference or this cell is used or not while calculating. For example, although cell A2 in formula "=IF(TRUE,A1,A2)" is not used while calculating, this formula is still be taken as A2's dependent.
  • To get those formulas whose calculated results depend on this cell, please use .
  • When tracing dependents for one cell, all formulas in the workbook or worksheet will be analized and checked. So it is a time consumed process. If user need to trace dependents for lots of cells, using this method will cause poor performance. For performance consideration, user should use instead. Or, user may gather precedents map of all cells by firstly, and then build the dependents map according to the precedents map.
[C#] Workbook workbook = new Workbook(); Cells cells = workbook.Worksheets[0].Cells; cells["A1"].Formula = "=B1+SUM(B1:B10)+[Book1.xls]Sheet1!B2"; cells["A2"].Formula = "=IF(TRUE,B2,B1)"; Cell[] dependents = cells["B1"].GetDependents(true); for (int i = 0; i < dependents.Length; i++) { Console.WriteLine(dependents[i].Name); }
Gets all precedents(reference to cells in current workbook) used by this cell's formula while calculating it. Enumerator to enumerate all references(ReferredArea) This method can only work with the situation that is true for the workbook and the workbook has been fully calculated. If this cell is not a formula or it does not reference to any other cells, null will be returned. [C#] Workbook workbook = new Workbook(); Cells cells = workbook.Worksheets[0].Cells; cells["A2"].Formula = "=IF(TRUE,B2,B1)"; workbook.Settings.FormulaSettings.EnableCalculationChain = true; workbook.CalculateFormula(); IEnumerator en = cells["A2"].GetPrecedentsInCalculation(); Console.WriteLine("A2's calculation precedents:"); while(en.MoveNext()) { ReferredArea r = (ReferredArea)en.Current; Console.WriteLine(r); } Gets all cells whose calculated result depends on this cell. Whether returns those dependents which do not reference to this cell directly but reference to other leafs of this cell Enumerator to enumerate all dependents(Cell objects) To use this method, please make sure the workbook has been set with true value for and has been fully calculated with this setting. If there is no formula reference to this cell, null will be returned. [C#] Workbook workbook = new Workbook(); Cells cells = workbook.Worksheets[0].Cells; cells["A1"].Formula = "=B1+SUM(B1:B10)+[Book1.xls]Sheet1!B2"; cells["A2"].Formula = "=IF(TRUE,B2,B1)"; workbook.Settings.FormulaSettings.EnableCalculationChain = true; workbook.CalculateFormula(); IEnumerator en = cells["B1"].GetDependentsInCalculation(false); Console.WriteLine("B1's calculation dependents:"); while(en.MoveNext()) { Cell c = (Cell)en.Current; Console.WriteLine(c.Name); } en = cells["B2"].GetDependentsInCalculation(false); Console.WriteLine("B2's calculation dependents:"); while(en.MoveNext()) { Cell c = (Cell)en.Current; Console.WriteLine(c.Name); } Get all cells which reference to this cell directly and need to be updated when this cell is modified. Enumerator to enumerate all dependents(Cell) NOTE: This class is now obsolete. Instead, please use Cell.GetDependentsInCalculation(bool) to get all dependents in calculation chain. This property will be removed 12 months later since May 2022. Aspose apologizes for any inconvenience you may have experienced. Get all cells which will be updated when this cell is modified. Whether returns those leafs that do not reference to this cell directly but reference to other leafs of this cell Enumerator to enumerate all dependents(Cell) NOTE: This class is now obsolete. Instead, please use Cell.GetDependentsInCalculation(bool) to get all dependents in calculation chain. This property will be removed 12 months later since May 2022. Aspose apologizes for any inconvenience you may have experienced. Indicates the cell's formula is an array formula and it is the first cell of the array. Indicates whether the cell's formula is dynamic array formula(true) or legacy array formula(false). Gets the array range if the cell's formula is an array formula. The array range. Only applies when the cell's formula is an array formula Indicates whether the cell formula is an array formula. Indicates whether the cell formula is an array formula. NOTE: This class is now obsolete. Instead, please use Cell.IsArrayFormula to check whether the cell formula is an array formula. This property will be removed 12 months later since May 2018. Aspose apologizes for any inconvenience you may have experienced. Indicates whether the cell formula is part of shared formula. Indicates whether this cell is part of table formula. Indicates whether this cell is part of table formula. NOTE: This class is now obsolete. Instead, please use Cell.IsTableFormula to check whether the cell formula is part of table formula. This property will be removed 12 months later since May 2018. Aspose apologizes for any inconvenience you may have experienced. Sets dynamic array formula and make the formula spill into neighboring cells if possible. the formula expression options to parse formula. "Parse" option will be ignored and the formula will always be parsed immediately whether calculate this dynamic array formula for those cells in the spilled range. the range that the formula should spill into. the returned range may be not same with the actual one that this dynamic array formula spills into. If there are non-empty cells in the range, the formula will be set for current cell only and marked as "#SPILL!". But for such kind of situation we still return the whole range that this formula should spill into. Sets dynamic array formula and make the formula spill into neighboring cells if possible. the formula expression options to parse formula. "Parse" option will be ignored and the formula will always be parsed immediately values(calculated results) for those cells with given dynamic array formula Whether calculate the spilled range for this dynamic array formula. If the "values" parameter is not null and this flag is false, then the spilled range's height will be values.Length and width will be values[0].Length. whether calculate this dynamic array formula for those cells in the spilled range when "values" is null or corresponding item in "values" for one cell is null. the range that the formula should spill into. the returned range may be not same with the actual one that this dynamic array formula spills into. If there are non-empty cells in the range, the formula will be set for current cell only and marked as "#SPILL!". But for such kind of situation we still return the whole range that this formula should spill into. Sets dynamic array formula and make the formula spill into neighboring cells if possible. the formula expression options to parse formula. "Parse" option will be ignored and the formula will always be parsed immediately values(calculated results) for those cells with given dynamic array formula Whether calculate the spilled range for this dynamic array formula. If the "values" parameter is not null and this flag is false, then the spilled range's height will be values.Length and width will be values[0].Length. whether calculate this dynamic array formula for those cells in the spilled range when "values" is null or corresponding item in "values" for one cell is null. The options for calculating formula. Commonly, for performance consideration, the property should be false. the range that the formula should spill into. the returned range may be not same with the actual one that this dynamic array formula spills into. If there are non-empty cells in the range, the formula will be set for current cell only and marked as "#SPILL!". But for such kind of situation we still return the whole range that this formula should spill into. Create two-variable data table for given range starting from this cell. Number of rows to populate the formula. Number of columns to populate the formula. the row input cell the column input cell values for cells in table formula range Create one-variable data table for given range starting from this cell. Number of rows to populate the formula. Number of columns to populate the formula. the input cell Indicates whether the input cell is a row input cell(true) or a column input cell(false). values for cells in table formula range Create two-variable data table for given range starting from this cell. Number of rows to populate the formula. Number of columns to populate the formula. row index of the row input cell column index of the row input cell row index of the column input cell column index of the column input cell values for cells in table formula range Create one-variable data table for given range starting from this cell. Number of rows to populate the formula. Number of columns to populate the formula. row index of the input cell column index of the input cell Indicates whether the input cell is a row input cell(true) or a column input cell(false). values for cells in table formula range Remove array formula. True represents converting the array formula to normal formula. Copies data from a source cell. Source object. Gets/sets the value contained in this cell. Possible type:

null,

Boolean,

DateTime,

Double,

Integer

String.

For int value, it may be returned as an Integer object or a Double object. And there is no guarantee that the returned value will be kept as the same type of object always.
Indicates if the cell's style is set. If return false, it means this cell has a default cell format. Returns a Characters object that represents a range of characters within the cell text. The index of the start of the character. The number of characters. Characters object. This method only works on cell with string value. [C#] Workbook excel = new Workbook(); Cells cells = excel.Worksheets[0].Cells; cells["A1"].PutValue("Helloworld"); cells["A1"].Characters(5, 5).Font.IsBold = true; cells["A1"].Characters(5, 5).Font.Color = Color.Blue; [Visual Basic] Dim excel as Workbook = new Workbook() Dim cells as Cells = exce.Worksheets(0).Cells cells("A1").PutValue("Helloworld") cells("A1").Characters(5, 5).Font.IsBold = True cells("A1").Characters(5, 5).Font.Color = Color.Blue Replace text of the cell with options. Cell placeholder String value to replace The replace options Insert some characters to the cell. If the cell is rich formatted, this method could keep the original formatting. The index. Inserted text. Indicates whether the string value of this cell is a rich formatted text. Returns all Characters objects that represents a range of characters within the cell text. All Characters objects Returns all Characters objects that represents a range of characters within the cell text. Indicates whether applying table style to the cell if the cell is in the table. All Characters objects Sets rich text format of the cell. All Characters objects. Checks if a cell is part of a merged range or not. Returns a object which represents a merged range. object. Null if this cell is not merged. Gets the comment of this cell. If there is no comment applies to the cell, returns null. Gets and sets the html string which contains data and some formats in this cell. Gets the html string which contains data and some formats in this cell. Indicates whether the value is compatible for html5 Returns a string represents the current Cell object. Convert to JSON struct data. Checks whether this object refers to the same cell with another. another object true if two objects refers to the same cell. Serves as a hash function for a particular type. A hash code for current Cell object. Checks whether this object refers to the same cell with another cell object. another cell object true if two cell objects refers to the same cell. Get the result of the conditional formatting. Returns null if no conditional formatting is applied to this cell, Gets the validation applied to this cell. Gets the value of validation which applied to this cell. Gets the table which contains this cell. Indicates whether setting this cell as a check box. Gets rich value of the cell. Gets and sets the embeddedn image in the cell. Represent an area of cells. [C#] //Create Cell Area CellArea ca = new CellArea(); ca.StartRow = 0; ca.EndRow = 0; ca.StartColumn = 0; ca.EndColumn = 0; [VB.NET] 'Create Cell Area Dim ca As CellArea = New CellArea() ca.StartRow = 0 ca.EndRow = 0 ca.StartColumn = 0 ca.EndColumn = 0 Gets or set the start row of this area. Gets or set the end row of this area. Gets or set the start column of this area. Gets or set the end column of this area. Compare two CellArea objects according to their top-left corner. If two corners are in different rows, then compare their row index. Otherwise compare their column index. If two corners are same, then 0 will be returned. Returns a string represents the current cell area object. Creates a cell area. The start row. The start column. The end row. The end column. Return a . Creates a cell area. The top-left cell of the range. The bottom-right cell of the range. Return a . Encapsulates a collection of cell relevant objects, such as , , ...etc. [C#] Workbook excel = new Workbook(); Cells cells = excel.Worksheets[0].Cells; //Set default row height cells.StandardHeight = 20; //Set row height cells.SetRowHeight(2, 20.5); //Set default colum width cells.StandardWidth = 15; //Set column width cells.SetColumnWidth(3, 12.57); //Merge cells cells.Merge(5, 4, 2, 2); //Put values to cells cells[0, 0].PutValue(true); cells[0, 1].PutValue(1); cells[0, 2].PutValue("abc"); //Export data object[,] arr = cells.ExportArray(0, 0, 10, 10); [Visual Basic] Dim excel as Workbook = new Workbook() Dim cells as Cells = excel.Worksheets(0).Cells 'Set default row height cells.StandardHeight = 20 'Set row height cells.SetRowHeight(2, 20.5) 'Set default colum width cells.StandardWidth = 15 'Set column width cells.SetColumnWidth(3, 12.57) 'Merge cells cells.Merge(5, 4, 2, 2) 'Export data Dim outDataTable as DataTable = cells.ExportDataTable(12, 12, 10, 10) Gets the list of fields of ods. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Gets the total count of instantiated Cell objects. Gets the total count of instantiated Cell objects. Gets the cells enumerator. The cells enumerator When traversing elements by the returned Enumerator, the cells collection should not be modified(such as operations that will cause new Cell/Row be instantiated or existing Cell/Row be deleted). Otherwise the enumerator may not be able to traverse all cells correctly(some elements may be traversed repeatedly or skipped). [C#] Workbook workbook = new Workbook("template.xlsx"); Cells cells = workbook.Worksheets[0].Cells; IEnumerator en = cells.GetEnumerator(); while (en.MoveNext()) { Cell cell = (Cell)en.Current; Console.WriteLine(cell.Name + ": " + cell.Value); } Gets the rows enumerator. The rows enumerator. NOTE: This member is now obsolete. Instead, please use RowCollection.GetEnumerator() method. This method will be removed 12 months later since May 2023. Aspose apologizes for any inconvenience you may have experienced. Gets the collection of objects that represents the individual rows in this worksheet. Gets the collection of merged cells. In this collection, each item is a structure which represents an area of merged cells. NOTE: This method is now obsolete. Instead, please use Cells.GetMergedAreas() method. This method will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced. Gets all merged cells. Gets the element or null at the specified cell row index and column index. Row index Column index Return Cell object if a Cell object exists. Return null if the cell does not exist. NOTE: This member is now obsolete. Instead, please use CheckCell(int row, int column) method. This method will be removed 12 months later since February 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the element at the specified cell row index. Row index If the row object does exist return Row object, otherwise return null. NOTE: This member is now obsolete. Instead, please use Cells.CheckRow(int row) method. This method will be removed 12 months later since February 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the element or null at the specified cell row index and column index. Row index Column index Return Cell object if a Cell object exists. Return null if the cell does not exist. Gets the element or null at the specified cell row index. Row index Returns object If the row object does exist, otherwise returns null. Gets the element or null at the specified column index. The column index. The Column object. Checks whether a row at given index is hidden. row index true if the row is hidden Checks whether a column at given index is hidden. column index true if the column is hidden. Adds a range object reference to cells The range object will be contained in the cells Creates a object from a range of cells. Upper left cell name. Lower right cell name. A object Creates a object from a range of cells. First row of this range First column of this range Number of rows Number of columns A object Creates a object from an address of the range. The address of the range. A object Creates a object from rows of cells or columns of cells. First row index or first column index, zero based. Total number of rows or columns, one based. True - Range created from columns of cells. False - Range created from rows of cells. A object. Gets the element at the specified cell row index and column index. Row index. Column index. The object. [C#] Workbook excel = new Workbook(); Cells cells = excel.Worksheets[0].Cells; Cell cell = cells[0, 0]; //Gets the cell at "A1" [Visual Basic] Dim excel as Workbook = New Workbook() Dim cells As Cells = excel.Worksheets(0).Cells Dim cell As Cell = cells(0,0) 'Gets the cell at "A1" Gets the element at the specified cell name. Cell name,including its column letter and row number, for example A5. A object [C#] Workbook excel = new Workbook(); Cells cells = excel.Worksheets[0].Cells; Cell cell = cells["A1"]; //Gets the cell at "A1" [Visual Basic] Dim excel as Workbook = New Workbook() Dim cells As Cells = excel.Worksheets(0).Cells Dim cell As Cell = cells("A1") 'Gets the cell at "A1" Gets or sets whether the cells data model should support Multi-Thread reading. Default value of this property is false. If there are multiple threads to read Row/Cell objects in this collection concurrently, this property should be set as true, otherwise unexpected result may be produced. Supporting Multi-Thread reading may degrade the performance for accessing Row/Cell objects from this collection. Please note, some features cannot support Multi-Thread reading, such as formatting values(by , , .etc.). So, even with this property being set as true, those APIs still may give unexpected result for Multi-Thread reading. Gets or sets the memory usage option for this cells. Clears all data of the worksheet. Gets and sets the default style of the worksheet. Gets or sets the default column width in the worksheet, in unit of inches. Gets or sets the default column width in the worksheet, in unit of pixels. Gets or sets the default column width in the worksheet, in unit of characters. Gets or sets the default row height in this worksheet, in unit of points. Gets or sets the default row height in this worksheet, in unit of pixels. Gets or sets the default row height in this worksheet, in unit of inches. Exports data in the collection to a object. [C#] string designerFile = "List.xls"; Workbook excel = new Workbook(designerFile); Worksheet sheet = excel.Worksheets[0]; DataTable dt = sheet.Cells.ExportDataTable(6, 1, 69, 4); [Visual Basic] Dim designerFile As String = "List.xls" Dim excel As excel = New excel(designerFile) Dim sheet As Worksheet = excel.Worksheets(0) Dim dt As DataTable = sheet.Cells.ExportDataTable(6, 1, 69, 4) The row number of the first cell to export out. The column number of the first cell to export out. Number of rows to be imported. Number of columns to be imported. Exported object. If you use this method to export a block of data, please be sure that the data in a column should be the same data type. Otherwise, use the method instead. Exports data in the collection to a object. The row number of the first cell to export out. The column number of the first cell to export out. Number of rows to be imported. Number of columns to be imported. Indicates whether the data in the first row are exported to the column name of the DataTable. Exported object. Exports data in the collection to a object. The row number of the first cell to export out. The column number of the first cell to export out. Number of rows to be imported. Number of columns to be imported. Exported object. All data in the collection are converted to strings. Exports data in the collection to a object. The row number of the first cell to export out. The column number of the first cell to export out. Number of rows to be imported. Number of columns to be imported. Indicates whether the data in the first row are exported to the column name of the DataTable. Exported object. All data in the collection are converted to strings. Exports data in the collection to a object. The row number of the first cell to export out. The column number of the first cell to export out. Number of rows to be imported. Number of columns to be imported. All export table options Exported object. Import data from custom data table. The custom data table. First row index. First column index. The import options Import data from custom data table. The object to be imported. First row index. First column index. The import options Total number of rows imported. [C#] Workbook excel = new Workbook(); Cells cells = excel.Worksheets[0].Cells; //Import data DataTable dt = new DataTable("Products"); dt.Columns.Add("Product_ID",typeof(Int32)); dt.Columns.Add("Product_Name",typeof(string)); dt.Columns.Add("Units_In_Stock",typeof(Int32)); DataRow dr = dt.NewRow(); dr[0] = 1; dr[1] = "Aniseed Syrup"; dr[2] = 15; dt.Rows.Add(dr); dr = dt.NewRow(); dr[0] = 2; dr[1] = "Boston Crab Meat"; dr[2] = 123; dt.Rows.Add(dr); ImportTableOptions options = new ImportTableOptions(); options.IsFieldNameShown = true; cells.ImportData(dt, 12, 12, options); [Visual Basic] Dim excel as Workbook = new Workbook() Dim cells as Cells = excel.Worksheets(0).Cells 'Import data Dim dt as DataTable = new DataTable("Employee") dt.Columns.Add("Employee_ID",typeof(Int32)) dt.Columns.Add("Employee_Name",typeof(string)) dt.Columns.Add("Gender",typeof(string)) Dim dr as DataRow = dt.NewRow() dr(0) = 1 dr(1) = "John Smith" dr(2) = "Male" dt.Rows.Add(dr) dr = dt.NewRow() dr(0) = 2 dr(1) = "Mary Miller" dr(2) = "Female" dt.Rows.Add(dr) Dim options as ImportTableOptions = new ImportTableOptions() options.IsFieldNameShown = True cells.ImportData(dt, 12, 12, options) 'Export data Dim outDataTable as DataTable = cells.ExportDataTable(12, 12, 10, 10) Import data from data view. The object to be imported. First row index. First column index. The import options Total number of rows imported. Imports data from a object. The object which contains data. The row number of the first cell to import in. The column number of the first cell to import in. Total number of rows imported. Imports data from a object. The object which contains data. The row number of the first cell to import in. The column number of the first cell to import in. The options of importing table. Total number of rows imported. Imports a DataRow into the Excel file. DataRow object. Row index. First column index. Imports a two-dimension array of data into a worksheet. Two-dimension data array. The row number of the first cell to import in. The column number of the first cell to import in. Imports a two-dimension array of data into a worksheet. Two-dimension data array. The row number of the first cell to import in. The column number of the first cell to import in. Indicates if this method will try to convert string to number. Imports a two-dimension array of data into a worksheet. Two-dimension data array. Two-dimension data style. The row number of the first cell to import in. The column number of the first cell to import in. Indicates if this method will try to convert string to number. Imports a two-dimension array of data into a worksheet. Two-dimension data array. Two-dimension data style. The row number of the first cell to import in. The column number of the first cell to import in. Options for converting string values Imports an array of data into a worksheet. Data array. The row number of the first cell to import in. The column number of the first cell to import in. Specifies to import data vertically or horizontally. Imports an arraylist of data into a worksheet. Data arraylist. The row number of the first cell to import in. The column number of the first cell to import in. Specifies to import data vertically or horizontally. Imports an array of data into a worksheet. Data array. The row number of the first cell to import in. The column number of the first cell to import in. Specifies to import data vertically or horizontally. Skipped number of rows or columns. Imports a two-dimension array of string into a worksheet. Two-dimension string array. The row number of the first cell to import in. The column number of the first cell to import in. Imports an array of formula into a worksheet. Formula array. The row number of the first cell to import in. The column number of the first cell to import in. Specifies to import data vertically or horizontally. Imports an array of string into a worksheet. String array. The row number of the first cell to import in. The column number of the first cell to import in. Specifies to import data vertically or horizontally. Imports a two-dimension array of integer into a worksheet. Two-dimension integer array. The row number of the first cell to import in. The column number of the first cell to import in. Imports an array of integer into a worksheet. Integer array. The row number of the first cell to import in. The column number of the first cell to import in. Specifies to import data vertically or horizontally. Imports a two-dimension array of double into a worksheet. Two-dimension double array. The row number of the first cell to import in. The column number of the first cell to import in. Imports an array of double into a worksheet. Double array. The row number of the first cell to import in. The column number of the first cell to import in. Specifies to import data vertically or horizontally. Splits content in specified column into multiple columns.. The row index. The column index. The number of rows. The split options. Total column count of the split values. Import a CSV file to the cells. The CSV file name. The splitter Whether the string in text file is converted to numeric data. The row number of the first cell to import in. The column number of the first cell to import in. Import a CSV file to the cells. The CSV file stream. The splitter Whether the string in text file is converted to numeric data. The row number of the first cell to import in. The column number of the first cell to import in. Import a CSV file to the cells. The CSV file name. The load options for reading text file The row number of the first cell to import in. The column number of the first cell to import in. Import a CSV file to the cells. The CSV file stream. The load options for reading text file The row number of the first cell to import in. The column number of the first cell to import in. Gets or sets a value indicating whether all worksheet values are preserved as strings. Default is false. Merges a specified range of cells into a single cell. First row of this range(zero based) First column of this range(zero based) Number of rows(one based) Number of columns(one based) Reference the merged cell via the address of the upper-left cell in the range. Merges a specified range of cells into a single cell. First row of this range(zero based) First column of this range(zero based) Number of rows(one based) Number of columns(one based) Merge conflict merged ranges. Reference the merged cell via the address of the upper-left cell in the range. If mergeConflict is true and the merged range conflicts with other merged cells, other merged cells will be automatically removed. Merges a specified range of cells into a single cell. First row of this range(zero based) First column of this range(zero based) Number of rows(one based) Number of columns(one based) Indicates whether check the merged cells intersects other merged cells Merge conflict merged ranges. Reference the merged cell via the address of the upper-left cell in the range. If mergeConflict is true and the merged range conflicts with other merged cells, other merged cells will be automatically removed. Unmerges a specified range of merged cells. First row of this range(zero based) First column of this range(zero based) Number of rows(one based) Number of columns(one based) Clears all merged ranges. Hides a row. Row index. Unhides a row. Row index. Row height. The row's height will be changed only when the row is hidden and given height value is positive. Hides multiple rows. The row index. The row number. Unhides the hidden rows. The row index. The row number. Row height. The row's height will be changed only when the row is hidden and given height value is positive. Sets row height in unit of pixels. Row index. Number of pixels. Sets row height in unit of inches. Row index. Number of inches. It should be between 0 and 409.5/72. Sets the height of the specified row. Row index. Height of row.In unit of point It should be between 0 and 409.5. Gets row's height. The row index. Whether returns the original row height or 0 for hidden row. Unit type of the returned height value Row's height Gets original row's height in unit of point if the row is hidden The row index. NOTE: This member is now obsolete. Instead, please use Cells.GetRowHeight(int,bool,CellsUnitType) method. This method will be removed 12 months later since April 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the column width. The column index. Indicates whether getting original width. Gets original column's height in unit of point if the column is hidden The row index. Width of column in normal view. NOTE: This method is now obsolete. Instead, please use Cells.GetColumnWidth(int ,bool , CellsUnitType ) method. This method will be removed 12 months later since April 2024. Aspose apologizes for any inconvenience you may have experienced. Hides a column. Column index. Unhides a column Column index. Column width. Hide multiple columns. Column index. Column number. Unhide multiple columns. Column index. Column number Column width. Only applies the column width to the hidden columns. Gets the height of a specified row, in unit of points. Row index Height of row Gets the height of a specified row. Row index. Height of row. Gets the height of a specified row in unit of inches. Row index Height of row Gets the height of a specified row in unit of inches. Row index Height of row Gets the height of a specified row in unit of pixel. Row index Height of row Sets column width in unit of pixels in normal view. Column index. Number of pixels. Sets column width in unit of inches in normal view. Column index. Number of inches. Sets the width of the specified column in normal view. Column index. Width of column.Column width must be between 0 and 255. To hide a column, sets column width to zero. Gets the width of the specified column in normal view, in units of pixel. Column index Width of column in normal view. Gets the width of the specified column in normal view, in units of pixel. Column index Indicates whether returning original width even when the column is hidden Width of column in normal view. NOTE: This method is now obsolete. Instead, please use Cells.GetColumnWidth(int ,bool , CellsUnitType ) method. This method will be removed 12 months later since April 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the width of the specified column in normal view, in units of inches. Column index Width of column Width of column in normal view. NOTE: This method is now obsolete. Instead, please use Cells.GetColumnWidth(int ,bool , CellsUnitType ) method. This method will be removed 12 months later since April 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the width(in unit of characters) of the specified column in normal view Column index Width of column. For spreadsheet, column width is measured as the number of characters of the maximum digit width of the numbers 0~9 as rendered in the normal style's font. Get the width in different view type. The column index. the column width in unit of pixels Sets the width of the column in different view. The column index. The width in unit of pixels. If the current view type is , the column's width is same as printed width. Minimum row index of cell which contains data or style. Maximum row index of cell which contains data or style. Return -1 if there is no cell which contains data or style in the worksheet. Minimum column index of those cells that have been instantiated in the collection(does not include the column where style is defined for the whole column but no cell has been instantiated in it). Maximum column index of those cells that have been instantiated in the collection(does not include the column where style is defined for the whole column but no cell has been instantiated in it). Return -1 if there is no cell has been instantiated. Minimum row index of cell which contains data. Return -1 if there is no cell which contains data. Maximum row index of cell which contains data. Return -1 if there is no cell which contains data. Minimum column index of cell which contains data. -1 will be returned if there is no cell which contains data. This property needs to iterate and check all cells in a worksheet, so it is a time-consumed progress and should not be invoked repeatedly. Maximum column index of cell which contains data. -1 will be returned if there is no cell which contains data. This property needs to iterate and check all cells in a worksheet, so it is a time-consumed progress and should not be invoked repeatedly. Gets the last row index of cell which contains data in the specified column. Column index. last row index. Indicates that row height and default font height matches Indicates whether the row is default hidden. Gets the collection of objects that represents the individual columns in this worksheet. Applies formats for a whole column. The column index. The style object which will be applied. Flags which indicates applied formatting properties. Applies formats for a whole row. The row index. The style object which will be applied. Flags which indicates applied formatting properties. Applies formats for a whole worksheet. The style object which will be applied. Flags which indicates applied formatting properties. Copies data and formats of a whole column. Source Cells object contains data and formats to copy. Source column index. Destination column index. The copied column number. the options of pasting. Copies data and formats of a whole column. Source Cells object contains data and formats to copy. Source column index. Destination column index. Copies data and formats of a whole column. Source Cells object contains data and formats to copy. Source column index. Destination column index. The copied column number. Copies data and formats of the whole columns. Source Cells object contains data and formats to copy. Source column index. The number of the source columns. Destination column index. The number of the destination columns. Copies data and formats of a whole row. Source Cells object contains data and formats to copy. Source row index. Destination row index. Copies data and formats of some whole rows. Source Cells object contains data and formats to copy. Source row index. Destination row index. The copied row number. Copies data and formats of some whole rows. Source Cells object contains data and formats to copy. Source row index. Destination row index. The copied row number. The copy options. Copies data and formats of some whole rows. Source Cells object contains data and formats to copy. Source row index. Destination row index. The copied row number. The copy options. the options of pasting. Gets the outline level (zero-based) of the row. The row index. The outline level (zero-based) of the row. If the row is not grouped, returns zero. Gets the outline level (zero-based) of the column. The column index The outline level of the column If the column is not grouped, returns zero. Gets the max grouped column outline level (zero-based). The max grouped column outline level (zero-based) Gets the max grouped row outline level (zero-based). The max grouped row outline level (zero-based) Expands the grouped rows/columns. True, expands the grouped rows. The row/column index Collapses the grouped rows/columns. True, collapse the grouped rows. The row/column index Ungroups columns. The first column index to be ungrouped. The last column index to be ungrouped. Groups columns. The first column index to be grouped. The last column index to be grouped. Groups columns. The first column index to be grouped. The last column index to be grouped. Specifies if the grouped columns are hidden. Ungroups rows. The first row index to be ungrouped. The last row index to be ungrouped. True, removes all grouped info.Otherwise, remove the outer group info. Ungroups rows. The first row index to be ungrouped. The last row index to be ungrouped. Only removes outer group info. Groups rows. The first row index to be grouped. The last row index to be grouped. Specifies if the grouped rows are hidden. Groups rows. The first row index to be grouped. The last row index to be grouped. Deletes a column. Index of the column to be deleted. Indicates whether update references in other worksheets. Deletes a column. Index of the column to be deleted. Deletes several columns. Index of the first column to be deleted. Count of columns to be deleted. Indicates whether update references in other worksheets. Deletes several columns. Index of the first column to be deleted. Count of columns to be deleted. Options for the deleting operation Check whether the range could be deleted. The start row index of the range. The start column index of the range. The number of the rows in the range. The number of the columns in the range. Deletes a row. Index of the row to be deleted. Deletes a row. Index of the row to be deleted. Indicates whether update references in other worksheets. Deletes multiple rows. The first row index to be deleted. Count of rows to be deleted. If the deleted range contains the top part(not whole) of the table(ListObject), the ranged could not be deleted and nothing will be done. It works in the same way with MS Excel. Deletes multiple rows in the worksheet. Index of the first row to be deleted. Count of rows to be deleted. Indicates whether update references in other worksheets. Deletes multiple rows in the worksheet. Index of the first row to be deleted. Count of rows to be deleted. Options for the deleting operation Delete all blank columns which do not contain any data. Delete all blank columns which do not contain any data. The options of deleting range. Checks whether given column is blank(does not contain any data). the column index true if given column does not contain any data Delete all blank rows which do not contain any data or other object. Delete all blank rows which do not contain any data or some special objects such as visible comment, pivot table. The options of deleting range. For blank rows that will be deleted, it is not only required that should be true, but also there should be no visible comment defined for any cell in those rows, and no pivot table whose range intersects with them. Inserts some columns into the worksheet. Column index. The number of columns. Inserts some columns into the worksheet. Column index. The number of columns. Indicates if references in other worksheets will be updated. Inserts some columns into the worksheet. Column index. The number of columns. The options for inserting operation. Inserts a new column into the worksheet. Column index. Indicates if references in other worksheets will be updated. Inserts a new column into the worksheet. Column index. Inserts multiple rows into the worksheet. Row index. Number of rows to be inserted. Indicates if references in other worksheets will be updated. Inserts multiple rows into the worksheet. Row index. Number of rows to be inserted. Options for inserting operation. Inserts multiple rows into the worksheet. Row index. Number of rows to be inserted. Inserts a new row into the worksheet. Row index. Gets the collection of objects created at run time. Clears contents and formatting of a range. Range to be cleared. Clears contents and formatting of a range. Start row index. Start column index. End row index. End column index. Clears contents of a range. Range to be cleared. Clears contents of a range. Start row index. Start column index. End row index. End column index. Clears formatting of a range. Range to be cleared. Clears formatting of a range. Start row index. Start column index. End row index. End column index. Gets the last cell in this worksheet. Returns null if there is no data in the worksheet. Link to a xml map. name of xml map row of the destination cell column of the destination cell path of xml element in xml map e.g. A xml map element structure: -RootElement |-Attribute1 |-SubElement |-Attribute2 |-Attribute3 To link "Attribute1", path is "/RootElement/Attribute1" To link "Attribute2", path is "/RootElement/SubElement/Attribute2" To link whole "SubElement", path is "/RootElement/SubElement" Gets the max range which includes data, merged cells and shapes. Reutrns null if the worksheet is empty since Aspose.Cells 21.5.2. Gets the first cell in this worksheet. Returns null if there is no data in the worksheet. Imports a into a worksheet. The object to be imported. The row number of the first cell to import in. The column number of the first cell to import in. Total number of rows imported Finds the cell containing with the input object. The object to search for. The type should be int,double,DateTime,string,bool. Previous cell with the same object. This parameter can be set to null if searching from the start. Cell object. Returns null (Nothing) if no cell is found. Finds the cell containing with the input object. The object to search for. The type should be int,double,DateTime,string,bool. Previous cell with the same object. This parameter can be set to null if searching from the start. Find options Cell object. Returns null (Nothing) if no cell is found. Gets the last cell in this row. Row index. Cell object. Gets the last cell in this column. Column index. Cell object. Gets the last cell with maximum column index in this range. Start row index. End row index. Start column index. End column index. Cell object. Gets the last cell with maximum row index in this range. Start row index. End row index. Start column index. End column index. Cell object. Moves the range. The range which should be moved. The dest row. The dest column. Insert cut range. The cut range. The row. The column. The shift type . Inserts a range of cells and shift cells according to the shift option. Shift area. Number of rows or columns to be inserted. Shift cells option. Indicates whether update references in other worksheets. Inserts a range of cells and shift cells according to the shift option. Shift area. Shift cells option. Inserts a range of cells and shift cells according to the shift option. Shift area. Number of rows or columns to be inserted. Shift cells option. Deletes a range of cells and shift cells according to the shift option. Start row index. Start column index. End row index. End column index. Shift cells option. Exports data in the collection to a two-dimension array object. The row number of the first cell to export out. The column number of the first cell to export out. Number of rows to be exported Number of columns to be exported Exported cell value array object. Exports cell value type in the collection to a two-dimension array object. The row number of the first cell to export out. The column number of the first cell to export out. Number of rows to be exported. Number of columns to be exported. Exported array object representing cell value types. Imports custom objects. The custom object The property names.If it is null,we will import all properties of the object. Indicates whether the property name will be imported to the first row. The row number of the first cell to import in. The column number of the first cell to import in. Number of rows to be imported. Indicates whether extra rows are added to fit data. Date format string for cells. Indicates if this method will try to convert string to number. Total number of rows imported. The custom objects should be the same type. Imports custom objects. The custom object The row number of the first cell to import in. The column number of the first cell to import in. The import options. Total number of rows imported. The custom objects should be the same type. Retrieves subtotals setting of the range. The range Creates subtotals for the range. The range The field to group by, as a zero-based integer offset The subtotal function. An array of zero-based field offsets, indicating the fields to which the subtotals are added. Creates subtotals for the range. The range The field to group by, as a zero-based integer offset The subtotal function. An array of zero-based field offsets, indicating the fields to which the subtotals are added. Indicates whether replace the current subtotals Indicates whether add page break between groups Indicates whether add summary below data. Removes all formula and replaces with the value of the formula. Removes duplicate rows in the sheet. Removes duplicate values in the range. The start row. The start column The end row index. The end column index. Removes duplicate data of the range. The start row. The start column The end row index. The end column index. Indicates whether the range contains headers. The column offsets. Converts all string data in the worksheet to numeric value if possible. Get all cells which refer to the specific cell. Indicates whether check other worksheets The row index. The column index. Gets all cells whose calculated result depends on specific cell. Row index of the specific cell Column index of the specific cell. Whether returns those dependents which do not reference to the specific cell directly but reference to other leafs of that cell. Enumerator to enumerate all dependents(Cell objects) To use this method, please make sure the workbook has been set with true value for and has been fully calculated with this setting. If there is no formula reference to this cell, null will be returned. For more details and example, please see Gets all cells that contain embedded picture. Enumerator to enumerate all Cell objects that contain embedded picture If there is no picture which is set as "Place in Cell" in this worksheet, null will be returned. Get the style of given cell. row index column the style of given cell. The returned style is only the one set for the cell or inherited from the row/column of the cell, does not include the applied properties by other settings such as conditional formattings. Get the display style of given cell. row index of given cell column of given cell the display style of given cell. Same with , and same with using for . Get the display style of given cell. row index of given cell column of given cell Indicates which borders need to be checked and adjusted according to the borders of adjacent cells. Please see the description for the same parameter of . the display style of given cell. If the cell is also affected by other settings such as conditional formatting, list objects, etc., then the display style may be different from . And because those settings also may be applied to empty(non-existing) cells, using this method can avoid the instantiation of those empty cells so the performance will be better than getting the Cell instance from Cells and then calling . The exception that is thrown when Aspose.Cells specified error occurs. Represents custom exception code. Utility for instantiating classes of Cells model. Creates a new style. Returns a style object. Cache options for data access. Can be combined with | operator for multiple options together. For some features, accessing large dataset requires a lot of repeated and complicated operations such as search, calculation, ...etc and those operations will take a lot of extra time. For common situations, all dependent data remains unchanged during the access, so some caches can be built and used to improve the access performance. For this purpose, we provide this API so that user can specify which kind of data access needs to be optimized by possible caching mechanism.

Please note, for different options, different data set may be required to be "read-only". And performance of accessing data depends on many aspects, the use of caching mechanism does not guarantee that performance will be improved. For some situations, such as the dataset to be accessed is small, using cache may cause even more time because caching itself also needs certain extra time.
No cache for any data access. Apply all possible optimizations for all kinds of data access in the workbook. All settings and data should not be changed during the optimized access. Apply possible optimization for getting object(such as Shape)'s position and size. Row height and column width settings should not be changed during the optimized access. Apply possible optimization for getting cells' values. Cells data(data and settings of Cell, Row) should not be changed during the optimized access, no new Cell/Row objects should be created either(such as by ). Apply possible optimization for getting display-related results of cells(, , , etc.). Cells data and style-related objects(Cell/Row/Column styles, column width, etc.) should not be changed during the optimized access. Apply possible optimization for getting formulas. All data and settings which may affect the formula expression(Worksheet's name, Name's text, table's column, etc.) should not be changed during the optimized access. Apply possible optimization for setting formulas. All data and settings which may affect the formula expression(Worksheet's name, Name's text, table's column, etc.) should not be changed during the optimized access. Apply possible optimization for calculating formulas. Cells data should not be changed during the optimized access, none new objects(Cell, Row, etc.) should be created either(such as by ). Apply possible optimization for getting formatting result of conditional formattings. All data and settings which may affect the result of conditional formattings(settings of conditional formattings, dependent cell values, etc.) should not be changed during the optimized access. Apply possible optimization for getting validation result. All data and settings which may affect the result of validation(settings of the validation, dependent cell values, etc.) should not be changed during the optimized access. Memory usage options. Default option for cells model. This option is applied for all versions. Memory performance preferrable. With this option the data will be held in compact format so for common scenarios it may give lower memory cost. However, this option also may degrade R/W performance a bit in some special cases. This option is available since v 8.0.0. Represents the cell value and corresponding type. Gets/sets the type of cell value. Gets/sets the cell value. The value must be of the correct type of object corresponding to the : TypeValuenull, any other object will be ignoreddoubleDateTimestringboolerror string such as "#VALUE!", "#NAME?", ... Specifies how to apply style for the value of the cell. Not formatted. Only formatted with the cell's original style. Formatted with the cell's displayed style. Gets the displayed string shown in ms excel. The main difference from is this option also considers the effect of column width. If the column width is too small to show the formatted string completely, "#" may be shown, just like what ms excel does. Specifies a cell value type. Cell value type is unknown. Blank cell. Corresponding value should be null. Cell value is numeric. Corresponding value must be int or double. Cell value is datetime. Corresponding value must be DateTime. Cell value is string. Corresponding value must be string. Cell value is boolean. Corresponding value must be bool. Cell contains error value. Corresponding value must be error string. Represents Cell Watch Item in the 'watch window'. Gets and sets the row of the cell. Gets and sets the column of the cell. Gets and sets the name of the cell. Represents the collection of cells on this worksheet being watched in the 'watch window'. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); // Get the first Worksheet. Worksheet sheet = workbook.Worksheets[0]; // Add Cell Watch Item into the watch window sheet.CellWatches.Add("B2"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Get the first Worksheet. Dim sheet as Worksheet = workbook.Worksheets(0); 'Add Cell Watch Item into the watch window sheet.CellWatches.Add("B2") Adds with row and column. The row index. The column index. Returns the position of this item in the collection. Adds with the name the of cell. The name of the cell. Gets and sets by index. The index. Gets and sets by the name of the cell. The name of the cell. PdfBookmarkEntry is an entry in pdf bookmark. if Text property of current instance is null or "", current instance will be hidden and children will be inserted on current level. [C#] Workbook workbook = new Workbook(); workbook.Worksheets.Add(); workbook.Worksheets.Add(); Cell cellInPage1 = workbook.Worksheets[0].Cells["A1"]; Cell cellInPage2 = workbook.Worksheets[1].Cells["A1"]; Cell cellInPage3 = workbook.Worksheets[2].Cells["A1"]; cellInPage1.PutValue("page1"); cellInPage2.PutValue("page2"); cellInPage3.PutValue("page3"); PdfBookmarkEntry pbeRoot = new PdfBookmarkEntry(); pbeRoot.Text = "root"; // if pbeRoot.Text = null, all children of pbeRoot will be inserted on the top level in the bookmark. pbeRoot.Destination = cellInPage1; pbeRoot.SubEntry = new ArrayList(); pbeRoot.IsOpen = false; PdfBookmarkEntry subPbe1 = new PdfBookmarkEntry(); subPbe1.Text = "section1"; subPbe1.Destination = cellInPage2; PdfBookmarkEntry subPbe2 = new PdfBookmarkEntry(); subPbe2.Text = "section2"; subPbe2.Destination = cellInPage3; pbeRoot.SubEntry.Add(subPbe1); pbeRoot.SubEntry.Add(subPbe2); PdfSaveOptions saveOptions = new PdfSaveOptions(); saveOptions.Bookmark = pbeRoot; workbook.Save("output_bookmark.pdf", saveOptions); [VB] Dim workbook As Workbook = New Workbook workbook.Worksheets.Add("sheet2") workbook.Worksheets.Add("sheet3") Dim cells As Cells = workbook.Worksheets(0).Cells Dim cellInPage1 As Cell = cells("A1") cellInPage1.PutValue("Page1") cells = workbook.Worksheets(1).Cells Dim cellInPage2 As Cell = cells("A1") cellInPage2.PutValue("Page2") cells = workbook.Worksheets(2).Cells Dim cellInPage3 As Cell = cells("A1") cellInPage3.PutValue("Page3") Dim pbeRoot As PdfBookmarkEntry = New PdfBookmarkEntry() pbeRoot.Text = "root" pbeRoot.Destination = cellInPage1 pbeRoot.SubEntry = New ArrayList pbeRoot.IsOpen = False Dim subPbe1 As PdfBookmarkEntry = New PdfBookmarkEntry() subPbe1.Text = "section1" subPbe1.Destination = cellInPage2 Dim subPbe2 As PdfBookmarkEntry = New PdfBookmarkEntry() subPbe2.Text = "section2" subPbe2.Destination = cellInPage3 pbeRoot.SubEntry.Add(subPbe1) pbeRoot.SubEntry.Add(subPbe2) Dim saveOptions As PdfSaveOptions = New PdfSaveOptions() saveOptions.Bookmark = pbeRoot workbook.Save("output_bookmark.pdf", saveOptions) Title of a bookmark. The cell to which the bookmark link. Gets or sets name of destination. If destination name is set, the destination will be defined as a named destination with this name. SubEntry of a bookmark. When this property is true, the bookmarkentry will expand, otherwise it will collapse. When this property is true, the bookmarkentry will collapse, otherwise it will expand. Specifies the way are exported to PDF file. No custom properties are exported. Custom properties are exported as entries in Info dictionary. Custom properties with the following names are not exported: "Title", "Author", "Subject", "Keywords", "Creator", "Producer", "CreationDate", "ModDate", "Trapped". Enumerates Bit Depth Type for tiff image. Default value, not set value. 1 bit per pixel 4 bits per pixel 8 bits per pixel 24 bits per pixel 32 bits per pixel Represents comment title type while rendering when comment is set to display at end of sheet. Represents comment title cell. Represents comment title comment. Represents comment title note. Represents comment title reply. DrawObject will be initialized and returned when rendering. Indicates the Cell object when rendering. All properties of cell can be accessed. Indicates the Shape object when rendering. All properties of shape can be accessed. Indicates image bytes of rendered Chart, Shape when rendering. Indicates the type of DrawObject. Indicates the page index of DrawObject. Page index is based on zero. One Sheet contains several pages when rendering. Indicates total pages in current rendering. Indicates current sheet index of DrawObject. Indicate Cell or Image of DrawObject. Indicate DrawObject is an Image indicate DrawObject is an Cell Interface to get DrawObject and Bound when rendering. Implements this interface to get DrawObject and Bound when rendering. DrawObject will be initialized and returned when rendering Left of DrawObject Top of DrawObject Width of DrawObject Height of DrawObject Specifies the method used to binarize image. Specifies threshold method. Specifies dithering using Floyd-Steinberg error diffusion method. Allows to specify options when rendering worksheet to images, printing worksheet or rendering chart to image. [C#] //Set Image Or Print Options ImageOrPrintOptions options = new ImageOrPrintOptions(); //Set output image format options.ImageType = ImageType.Png; //Set Horizontal resolution options.HorizontalResolution = 300; //Set Vertical Resolution options.VerticalResolution = 300; //Instantiate Workbook Workbook book = new Workbook("test.xls"); //Save chart as Image using ImageOrPrint Options book.Worksheets[0].Charts[0].ToImage("chart.png", options); [VB.NET] 'Set Image Or Print Options Dim options As New ImageOrPrintOptions() 'Set output image format options.ImageType = ImageType.Png 'Set Horizontal resolution options.HorizontalResolution = 300 'Set Vertical Resolution options.VerticalResolution = 300 'Instantiate Workbook Dim book As New Workbook("test.xls") 'Save chart as Image using ImageOrPrint Options book.Worksheets(0).Charts(0).ToImage("chart.png", options) Gets or sets the output file format type Support Tiff/XPS NOTE: This member is now obsolete. Instead, For Tiff/Svg, use ; For Xps, use with . This property will be removed 12 months later since August 2022. Aspose apologizes for any inconvenience you may have experienced. If PrintWithStatusDialog = true , there will be a dialog that shows current print status. else no such dialog will show. Gets or sets the horizontal resolution for generated images, in dots per inch. The default value is 96. Setting and effects the width and height of the output image in pixels. The following code sets resolution to 192, the width and height of the generated image is twice of the one with resolution left as the default value 96. Workbook wb = new Workbook("Book1.xlsx"); ImageOrPrintOptions opts = new ImageOrPrintOptions(); //Set output image type: png. opts.ImageType = ImageType.Png; //Set resolution to 192. opts.HorizontalResolution = 192; opts.VerticalResolution = 192; //Render worksheet page to image. SheetRender sr = new SheetRender(wb.Worksheets[0], opts); sr.ToImage(0, "Sheet_Page1.png"); Gets or sets the vertical resolution for generated images, in dots per inch. The default value is 96. Setting and effects the width and height of the output image in pixels. The following code sets resolution to 192, the width and height of the generated image is twice of the one with resolution left as the default value 96. Workbook wb = new Workbook("Book1.xlsx"); ImageOrPrintOptions opts = new ImageOrPrintOptions(); //Set output image type: png. opts.ImageType = ImageType.Png; //Set resolution to 192. opts.HorizontalResolution = 192; opts.VerticalResolution = 192; //Render Chart to image. wb.Worksheets[0].Charts[0].ToImage("Chart.png", opts); Gets or sets the type of compression to apply only when saving pages to the Tiff format. Has effect only when saving to TIFF. The default value is Lzw. Gets or sets bit depth to apply only when saving pages to the Tiff format. Has effect only when saving to TIFF. If TiffCompression is set to CCITT3, CCITT4, this will not take effect, the bit depth of the generated tiff image will be always 1. Gets or sets method used while converting images to 1 bpp format when is Tiff and is equal to Ccitt3 or Ccitt4. The default value is FloydSteinbergDithering. Indicates which pages will not be printed. Gets or sets a value determining the quality of the generated images to apply only when saving pages to the Jpeg format. The default value is 100 Has effect only when saving to JPEG. The value must be between 0 and 100. The default value is 100. Gets or sets the format of the generated images. default value: PNG. Indicates whether the width and height of the cells is automatically fitted by cell value. The default value is false. NOTE: This member is now obsolete. Instead, please use and . This property will be removed 12 months later since August 2022. Aspose apologizes for any inconvenience you may have experienced. If OnePagePerSheet is true , all content of one sheet will output to only one page in result. The paper size of pagesetup will be invalid, and the other settings of pagesetup will still take effect. If AllColumnsInOnePagePerSheet is true , all column content of one sheet will output to only one page in result. The width of paper size of pagesetup will be invalid, and the other settings of pagesetup will still take effect. Implements this interface to get DrawObject and Bound when rendering. Indicate the filename of embedded image in svg. This should be full path with directory like "c:\\xpsEmbedded" if this property is true, the generated svg will fit to view port. Gets and sets the prefix of the css name in svg,the default value is empty string. If this property is true , one Area will be output, and no scale will take effect. Indicates if the background of generated image should be transparent. The default value is false. That means the background of the generated images is white. Gets or sets warning callback. Control/Indicate progress of page saving process. Indicates whether to only substitute the font of character when the cell font is not compatibility for it. Default is false. We will try default font of Workbook and PdfSaveOption/system for cell font first. Gets or sets the 0-based index of the first page to save. Default is 0. Gets or sets the number of pages to save. Default is System.Int32.MaxValue which means all pages will be rendered. Sets desired width and height of image. desired width in pixels desired height in pixels NOTE: This member is now obsolete. Instead, please use by setting param keepAspectRatio to false. This property will be removed 12 months later since May 2023. Aspose apologizes for any inconvenience you may have experienced. Sets desired width and height of image. desired width in pixels desired height in pixels whether to keep aspect ratio of origin image The width and height of the output image in pixels will be only based on the set desired width and height. The and will not effect the width and height of the output image in this case. Indicates whether to optimize the output elements. Default value is false. Currently when this property is set to true, the following optimizations will be done: 1. optimize the border lines. 2. optimize the file size while rendering to Svg image. When characters in the Excel are Unicode and not be set with correct font in cell style, They may appear as block in pdf,image. Set the DefaultFont such as MingLiu or MS Gothic to show these characters. If this property is not set, Aspose.Cells will use system default font to show these unicode characters. When characters in the Excel are Unicode and not be set with correct font in cell style, They may appear as block in pdf,image. Set this to true to try to use workbook's default font to show these characters first. Default is true. Indicates whether to output a blank page when there is nothing to print. Default is false. Gets or sets gridline type. Default is Dotted type. Gets or sets displaying text type when the text width is larger than cell width. Gets or sets default edit language. It may display/render different layouts for text paragraph when different edit languages is set. Default is . Gets or sets the sheets to render. Default is all visible sheets in the workbook: . The set is ignored when it is used in Setting for rendering Emf metafile. EMF metafiles identified as "EMF+ Dual" can contain both EMF+ records and EMF records. Either type of record can be used to render the image, only EMF+ records, or only EMF records. When is set, then EMF+ records will be parsed while rendering to image, otherwise only EMF records will be parsed. Default value is . For the frameworks that depend on .Net System.Drawing.Common, this setting is ignored. Control/Indicate progress of page saving process. Control/Indicate a page starts to be output. Info for a page starts saving process. Control/Indicate a page ends to be output. Info for a page ends saving process. Info for a page ends saving process. Gets or sets a value indicating whether having more pages to be output. The default value is true. Info for a page saving process. Current page index, zero based. Total page count. Info for a page starts saving process. Gets or sets a value indicating whether the page should be output. The default value is true. Font for rendering. Initializes a new instance of the font name font size in points Gets name of the font. Gets size of the font in points. Gets or sets bold for the font. Gets or sets italic for the font. Gets or sets color for the font. Watermark for rendering. Creates instance of text watermark. watermark text watermark font Creates instance of image watermark. Gets or sets roation of the watermark in degrees. Gets or sets scale relative to target page in percent. Gets or sets opacity of the watermark in range [0, 1]. Indicates whether the watermark is placed behind page contents. Gets text of the watermark. Gets font of the watermark. Gets image of the watermark. Gets or sets horizontal alignment of the watermark to the page. Only Left, Center, Right is valid. Default is Left. Gets or sets vertical alignment of the watermark to the page. Only Top, Center, Bottom is valid. Default is Top. Gets or sets offset value to Gets or sets offset value to Worksheet printing preview. The construct of SheetPrintingPreview Indicate which spreadsheet to be printed. ImageOrPrintOptions contains some property of output Evaluate the total page count of this worksheet The following code shows the fastest way to get page count of a worksheet. Workbook workbook = new Workbook("Book1.xlsx"); SheetPrintingPreview sheetPrintingPreview = new SheetPrintingPreview(workbook.Worksheets[0], new ImageOrPrintOptions()); //fastest way to get page count especailly when there are massive data in worksheet. Console.WriteLine(sheetPrintingPreview.EvaluatedPageCount); Represents a worksheet render which can render worksheet to various images such as (BMP, PNG, JPEG, TIFF..) The constructor of this class , must be used after modification of pagesetup, cell style. Gets the total page count of current worksheet. Gets calculated page scale of the sheet. Returns the set scale if is set. Otherwise, returns the calculated scale according to and . Workbook wb = new Workbook("Book1.xlsx"); SheetRender sheetRender = new SheetRender(wb.Worksheets[0], new ImageOrPrintOptions()); //Gets calculated page scale of the sheet. double pageScale = sheetRender.PageScale; the construct of SheetRender, need worksheet and ImageOrPrintOptions as params Indicate which spreadsheet to be rendered. ImageOrPrintOptions contains some property of output image Get page size in inch of output image. The page index is based on zero. Page size of image, [0] for width and [1] for height Render certain page to a file. indicate which page is to be converted filename of the output image The following code outputs the first page of the first sheet to png image. //load the source file with images. Workbook wb = new Workbook("Book1.xlsx"); ImageOrPrintOptions imgOpt = new ImageOrPrintOptions(); //set output image type. imgOpt.ImageType = ImageType.Png; //render the first sheet. SheetRender sr = new SheetRender(wb.Worksheets[0], imgOpt); //output the first page of the sheet to image. sr.ToImage(0, "output.png"); Render certain page to a stream. indicate which page is to be converted the stream of the output image Render whole worksheet as Tiff Image to stream. the stream of the output image Render whole worksheet as Tiff Image to a file. the filename of the output image The following code outputs all the pages of the first sheet to Tiff image. //load the source file with images. Workbook wb = new Workbook("Book1.xlsx"); ImageOrPrintOptions imgOpt = new ImageOrPrintOptions(); //set output image type. imgOpt.SaveFormat = SaveFormat.Tiff; //render the first sheet. SheetRender sr = new SheetRender(wb.Worksheets[0], imgOpt); //output all the pages of the sheet to Tiff image. sr.ToTiff("output.tiff"); Releases resources created and used for rendering. Describes a set of sheets. Creates a sheet set based on exact sheet indexes. zero based sheet indexes. If a sheet is encountered that is not in the workbook, an exception will be thrown during rendering. Creates a sheet set based on exact sheet names. sheet names. If a sheet is encountered that is not in the workbook, an exception will be thrown during rendering. Gets a set with active sheet of the workbook. Gets a set with visible sheets of the workbook in their original order. Gets a set with all sheets of the workbook in their original order. Specifies what type of compression to apply when saving images into TIFF format file. Specifies no compression. Specifies the RLE compression scheme. Specifies the LZW compression scheme. Specifies the CCITT3 compression scheme. Specifies the CCITT4 compression scheme. Workbook printing preview. The construct of WorkbookPrintingPreview Indicate which workbook to be printed. ImageOrPrintOptions contains some property of output Evaluate the total page count of this workbook The following code shows the fastest way to get page count of a workbook. Workbook workbook = new Workbook("Book1.xlsx"); WorkbookPrintingPreview workbookPrintingPreview = new WorkbookPrintingPreview(workbook, new ImageOrPrintOptions()); //fastest way to get page count especailly when there are massive data in workbook. Console.WriteLine(workbookPrintingPreview.EvaluatedPageCount); Represents a Workbook render. The constructor of this class , must be used after modification of pagesetup, cell style. Gets the total page count of workbook. The construct of WorkbookRender Indicate which workbook to be rendered. ImageOrPrintOptions contains some property of output image Get page size in inch of output image. The page index is based on zero. Page size of image, [0] for width and [1] for height Render whole workbook as Tiff Image to stream. the stream of the output image Render whole workbook as Tiff Image to a file. the filename of the output image Render certain page to a file. indicate which page is to be converted filename of the output image Render certain page to a stream. indicate which page is to be converted the stream of the output image Releases resources created and used for rendering. Allowing user to set PDF conversion's Compatibility Pdf format compatible with PDF 1.4 NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced. Pdf format compatible with PDF 1.4 Pdf format compatible with PDF 1.5 Pdf format compatible with PDF 1.6 Pdf format compatible with PDF 1.7 Pdf format compatible with PDF/A-1b(ISO 19005-1) Pdf format compatible with PDF/A-1a(ISO 19005-1) Pdf format compatible with PDF/A-2b(ISO 19005-2) Pdf format compatible with PDF/A-2u(ISO 19005-2) Pdf format compatible with PDF/A-2a(ISO 19005-2) Pdf format compatible with PDF/A-3b(ISO 19005-3) Pdf format compatible with PDF/A-3u(ISO 19005-3) Pdf format compatible with PDF/A-3a(ISO 19005-3) Specifies a type of compression applied to all content in the PDF file except images. None Rle Lzw Flate Represents pdf embedded font encoding. Represents use Identity-H encoding for all embedded fonts in pdf. Represents prefer to use WinAnsiEncoding for TrueType fonts with characters 32-127, otherwise, Identity-H encoding will be used for embedded fonts in pdf. Specifies a type of optimization. High print quality File size is more important than print quality Font Arial and Times New Roman with characters 32-127 will not be embedded in pdf. Border lines are optimized for smaller file size. Options for encrypting and access permissions for a PDF document. PDF/A does not allow security setting. The constructor of PdfSecurityOptions The following code sets high resolution print permisson for the output pdf. Workbook wb = new Workbook(); wb.Worksheets[0].Cells["A1"].Value = "Aspose"; PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); PdfSecurityOptions pdfSecurityOptions = new PdfSecurityOptions(); //set owner password pdfSecurityOptions.OwnerPassword = "YourOwnerPassword"; //set user password pdfSecurityOptions.UserPassword = "YourUserPassword"; //set print permisson pdfSecurityOptions.PrintPermission = true; //set high resolution for print pdfSecurityOptions.FullQualityPrintPermission = true; pdfSaveOptions.SecurityOptions = pdfSecurityOptions; wb.Save("output.pdf", pdfSaveOptions); Gets or sets the user password required for opening the encrypted PDF document.

The owner password or user password will be required to open an encrypted PDF document for viewing.

The user password can be null or empty string, in this case no password will be required from the user when opening the PDF document.

Opening the document with the correct owner password allows full access to the document.

Opening the document with the correct user password (or opening a document that does not have a user password) allows limited access as the permissions specified.

Gets or sets the owner password for the encrypted PDF document. The owner password allows the user to open an encrypted PDF document without any access restrictions specified. Indicates whether to allow to print the document. Possibly not at the highest quality level, depending on whether is also set. Indicates whether to allow to modify the contents of the document by operations other than those controlled by , and . Permission to copy or extract content Obsoleted according to PDF reference. NOTE: This member is now obsolete. Instead, please use ExtractContentPermission property. This property will be removed 12 months later since September 2023. Aspose apologizes for any inconvenience you may have experienced. Indicates whether to allow to add or modify text annotations, fill in interactive form fields. if is also set, create or modify interactive form fields (including signature fields). Indicates whether to allow to fill in existing interactive form fields (including signature fields), even if is clear. Indicates whether to allow to copy or otherwise extract text and graphics from the document by operations other than that controlled by . Indicates whether to allow to extract text and graphics (in support of accessibility to users with disabilities or for other purposes). Indicates whether to allow to assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if is clear. Indicates whether to allow to print the document to a representation from which a faithful digital copy of the PDF content could be generated. When it is clear (and is set), printing is limited to a low level representation of the appearance, possibly of degraded quality. The Aspose.Cells.Rendering.PdfSecurity namespace provides classes security options of Rendering pdf. The Aspose.Cells.Rendering namespace provides classes for rendering image and pdf. Encapsulates the object that represents an area format. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Workbook object int sheetIndex = workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[sheetIndex]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(60); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(32); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", true); //Setting the foreground color of the plot area chart.PlotArea.Area.ForegroundColor = Color.Blue; //Setting the foreground color of the chart area chart.ChartArea.Area.ForegroundColor = Color.Yellow; //Setting the foreground color of the 1st NSeries area chart.NSeries[0].Area.ForegroundColor = Color.Red; //Setting the foreground color of the area of the 1st NSeries point chart.NSeries[0].Points[0].Area.ForegroundColor = Color.Cyan; //Saving the Excel file workbook.Save("book1.xls"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Workbook object Dim sheetIndex As Integer = workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(60) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(32) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a chart to the worksheet Dim chartIndex As Integer = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", True) 'Setting the foreground color of the plot area chart.PlotArea.Area.ForegroundColor = Color.Blue 'Setting the foreground color of the chart area chart.ChartArea.Area.ForegroundColor = Color.Yellow 'Setting the foreground color of the 1st NSeries area chart.NSeries(0).Area.ForegroundColor = Color.Red 'Setting the foreground color of the area of the 1st NSeries point chart.NSeries(0).Points(0).Area.ForegroundColor = Color.Cyan 'Saving the Excel file workbook.Save("book1.xls") Gets or sets the background of the . Gets or sets the foreground . Represents the formatting of the area. If the property is true and the value of chart point is a negative number, the foreground color and background color will be exchanged. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Workbook object int sheetIndex = workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[sheetIndex]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(-100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "A3" chart.NSeries.Add("A1:A3", true); chart.NSeries[0].Area.InvertIfNegative = true; //Setting the foreground color of the 1st NSeries area chart.NSeries[0].Area.ForegroundColor = Color.Red; //Setting the background color of the 1st NSeries area. //The displayed area color of second chart point will be the background color. chart.NSeries[0].Area.BackgroundColor = Color.Yellow; //Saving the Excel file workbook.Save("book1.xls"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Workbook object Dim sheetIndex As Integer = workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(-100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a chart to the worksheet Dim chartIndex As Integer = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "A3" chart.NSeries.Add("A1:A3", True) chart.NSeries(0).Area.InvertIfNegative = True 'Setting the foreground color of the 1st NSeries area chart.NSeries(0).Area.ForegroundColor = Color.Red 'Setting the background color of the 1st NSeries area. 'The displayed area color of second chart point will be the background color. chart.NSeries(0).Area.BackgroundColor = Color.Yellow 'Saving the Excel file workbook.Save("book1.xls") Represents a object that contains fill formatting properties for the specified chart or shape. Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear). Specifies the preset shape geometry that is to be used for a chart. Represents the rectangle shape. Represents the round rectangle shape. Represents the ellipse shape. Represents the right arrow callout shape. Represents the down arrow callout shape. Represents the left arrow callout shape. Represents the up arrow callout shape. Represents the wedge rectangle callout shape. Represents the wedge round rectangle callout shape. Represents the wedge ellipse callout shape. Represents the line callout shape. Represents the bent line callout shape. Represents the line with accent bar callout shape. Represents the bent line with accent bar callout shape. This type is only used for special file processing Fill format set type. No Fill format. Gradient fill format. Texture fill format. Pattern fill format. Represents tile picture as texture. Gets or sets the X offset for tiling picture. Gets or sets the Y offset for tiling picture. Gets or sets the X scale for tiling picture. Gets or sets the Y scale for tiling picture. Gets or sets the mirror type for tiling. Gets or sets the alignment for tiling. Enumerates the weight types for a picture border or a chart line. Represents the weight of hair line. Represents the weight of medium line. Represents the weight of single line. Represents the weight of wide line. Represents the ActiveX control. Indicates whether the control can receive the focus and respond to user-generated events. Indicates whether data in the control is locked for editing. Indicates whether the control is transparent. Indicates whether the control will automatically resize to display its entire contents. Gets and sets the default run-time mode of the Input Method Editor for the control as it receives focus. Represents the font of the control. Represents how to align the text used by the control. Gets and sets the binary data of the control. Represents the ActiveX control. Gets the object. Gets the type of the ActiveX control. Gets and sets the width of the control in unit of points. Gets and sets the height of the control in unit of points. Gets and sets a custom icon to display as the mouse pointer for the control. Gets and sets the type of icon displayed as the mouse pointer for the control. Gets and sets the ole color of the foreground. Not applies to Image control. Gets and sets the ole color of the background. Indicates whether this control is visible. Indicates whether to show a shadow. Gets and sets the linked cell. Gets and sets the list fill range. Gets and sets the binary data of the control. Represents a CheckBox ActiveX control. Gets the type of the ActiveX control. Gets and sets the group's name. Gets and set the position of the Caption relative to the control. Indicates whether the contents of the control automatically wrap at the end of a line. Gets and set the descriptive text that appears on a control. Gets and set the location of the control's picture relative to its caption. Gets and sets the special effect of the control. Gets and sets the data of the picture. Gets and sets the accelerator key for the control. Indicates if the control is checked or not. Indicates how the specified control will display Null values. Setting Description True The control will cycle through states for Yes, No, and Null values. The control appears dimmed (grayed) when its Value property is set to Null. False (Default) The control will cycle through states for Yes and No values. Null values display as if they were No values. Represents a ComboBox ActiveX control. Gets the type of the ActiveX control. Gets and sets the maximum number of characters Gets and set the width in unit of points. Represents how the Value property is determined for a ComboBox or ListBox when the MultiSelect properties value (fmMultiSelectSingle). Represents the column in a ComboBox or ListBox to display to the user. Represents the number of columns to display in a ComboBox or ListBox. Represents the maximum number of rows to display in the list. Indicates how a ListBox or ComboBox searches its list as the user types. Specifies the symbol displayed on the drop button Specifies the symbol displayed on the drop button Gets and sets the visual appearance. Gets and set the type of border used by the control. Gets and sets the ole color of the background. Gets and sets the special effect of the control. Indicates whether the user can type into the control. Indicates whether column headings are displayed. Indicates whether dragging and dropping is enabled for the control. Specifies selection behavior when entering the control. True specifies that the selection remains unchanged from last time the control was active. False specifies that all the text in the control will be selected when entering the control. Specifies the basic unit used to extend a selection. True specifies that the basic unit is a single character. false specifies that the basic unit is a whole word. Indicates whether the user can select a line of text by clicking in the region to the left of the text. Gets and sets the value of the control. Indicates whether selected text in the control appears highlighted when the control does not have focus. Gets and sets the width of the column. Represents a command button. Gets the type of the ActiveX control. Gets and set the descriptive text that appears on a control. Gets and set the location of the control's picture relative to its caption. Gets and sets the data of the picture. Gets and sets the accelerator key for the control. Indicates whether the control takes the focus when clicked. Indicates whether the contents of the control automatically wrap at the end of a line. Represents the persistence method to persist an ActiveX control. The data is stored as xml data. The data is stored as a storage binary data. The data is stored as a stream binary data. The data is stored as a streaminit binary data. Represents the border type of the ActiveX control. No border. The single line. Represents the position of the Caption relative to the control. The left of the control. The right of the control. Represents the visual appearance of the list in a ListBox or ComboBox. Displays a list in which the background of an item is highlighted when it is selected. Displays a list in which an option button or a checkbox next to each entry displays the selection state of that item. Represents how a ListBox or ComboBox searches its list as the user types. The control searches for the next entry that starts with the character entered. Repeatedly typing the same letter cycles through all entries beginning with that letter. As each character is typed, the control searches for an entry matching all characters entered. The list will not be searched when characters are typed. Represents the type of icon displayed as the mouse pointer for the control. Standard pointer. Arrow. Cross-hair pointer. I-beam. Double arrow pointing northeast and southwest. Double arrow pointing north and south. Double arrow pointing northwest and southeast. Double arrow pointing west and east. Up arrow. Hourglass. "Not” symbol (circle with a diagonal line) on top of the object being dragged. Arrow with an hourglass. Arrow with a question mark. "Size-all” cursor (arrows pointing north, south, east, and west). Uses the icon specified by the MouseIcon property. Represents the alignment of the picture inside the Form or Image. The top left corner. The top right corner. The center. The bottom left corner. The bottom right corner. Represents the location of the control's picture relative to its caption. The picture appears to the left of the caption. The caption is aligned with the top of the picture. The picture appears to the left of the caption. The caption is centered relative to the picture. The picture appears to the left of the caption. The caption is aligned with the bottom of the picture. The picture appears to the right of the caption. The caption is aligned with the top of the picture. The picture appears to the right of the caption. The caption is centered relative to the picture. The picture appears to the right of the caption. The caption is aligned with the bottom of the picture. The picture appears above the caption. The caption is aligned with the left edge of the picture. The picture appears above the caption. The caption is centered below the picture. The picture appears above the caption. The caption is aligned with the right edge of the picture. The picture appears below the caption. The caption is aligned with the left edge of the picture. The picture appears below the caption. The caption is centered above the picture. The picture appears below the caption. The caption is aligned with the right edge of the picture. The picture appears in the center of the control. The caption is centered horizontally and vertically on top of the picture. Represents how to display the picture. Crops any part of the picture that is larger than the control's boundaries. Stretches the picture to fill the control's area. This setting distorts the picture in either the horizontal or vertical direction. Enlarges the picture, but does not distort the picture in either the horizontal or vertical direction. Represents the type of scroll bar. Displays no scroll bars. Displays a horizontal scroll bar. Displays a vertical scroll bar. Displays both a horizontal and a vertical scroll bar. Represents type of scroll orientation Control is rendered horizontally when the control's width is greater than its height. Control is rendered vertically otherwise. Control is rendered vertically. Control is rendered horizontally. Represents the type of special effect. Flat Raised Sunken Etched Bump Represents all type of ActiveX control. Button ComboBox CheckBox ListBox TextBox Spinner RadioButton Label Image ToggleButton ScrollBar ScrollBar Unsupported. Unknown Represents the symbol displayed on the drop button. Displays a button with no symbol. Displays a button with a down arrow. Displays a button with an ellipsis (...). Displays a button with a horizontal line like an underscore character. Represents the default run-time mode of the Input Method Editor. Does not control IME. IME on. IME off. English mode. IME off.User can't turn on IME by keyboard. IME on with Full-width hiragana mode. IME on with Full-width katakana mode. IME on with Half-width katakana mode. IME on with Full-width Alphanumeric mode. IME on with Half-width Alphanumeric mode. IME on with Full-width hangul mode. IME on with Half-width hangul mode. IME on with Full-width hanzi mode. IME on with Half-width hanzi mode. Specifies when to show the drop button Never show the drop button. Show the drop button when the control has the focus. Always show the drop button. Represents the image control. Gets the type of the ActiveX control. Indicates whether the control will automatically resize to display its entire contents. Gets and sets the ole color of the background. Gets and set the type of border used by the control. Gets and sets how to display the picture. Gets and sets the special effect of the control. Gets and sets the data of the picture. Gets and sets the alignment of the picture inside the Form or Image. Indicates whether the picture is tiled across the background. Represents the label ActiveX control. Gets the type of the ActiveX control. Gets and set the descriptive text that appears on a control. Gets and set the location of the control's picture relative to its caption. Gets and sets the ole color of the background. Gets and set the type of border used by the control. Gets and sets the special effect of the control. Gets and sets the data of the picture. Gets and sets the accelerator key for the control. Indicates whether the contents of the control automatically wrap at the end of a line. Represents a ListBox ActiveX control. Gets the type of the ActiveX control. Indicates specifies whether the control has vertical scroll bars, horizontal scroll bars, both, or neither. Gets and set the width in unit of points. Represents how the Value property is determined for a ComboBox or ListBox when the MultiSelect properties value (fmMultiSelectSingle). Represents the column in a ComboBox or ListBox to display to the user. Represents the number of columns to display in a ComboBox or ListBox. Indicates how a ListBox or ComboBox searches its list as the user types. Gets and sets the visual appearance. Indicates whether the control permits multiple selections. Gets and sets the value of the control. Only effects when is SelectionType.Single; Gets and set the type of border used by the control. Gets and sets the ole color of the background. Gets and sets the special effect of the control. Indicates whether column headings are displayed. Indicates whether the control will only show complete lines of text without showing any partial lines. Gets and sets the width of the column. Represents a RadioButton ActiveX control. [C#] //Initialize a new workbook. Workbook book = new Workbook(); //Add a ToggleButtonActiveXControl. Shape shape = book.Worksheets[0].Shapes.AddActiveXControl(ControlType.RadioButton, 1, 0, 1, 0, 100, 50); RadioButtonActiveXControl activeXControl = (RadioButtonActiveXControl)shape.ActiveXControl; //do your business //Save the excel file. book.Save("exmaple.xlsx"); Gets the type of the ActiveX control. [C#] if(activeXControl.Type == Aspose.Cells.Drawing.ActiveXControls.ControlType.RadioButton) { //do something } Gets and sets the group's name. [C#] activeXControl.GroupName = "GroupName123"; Gets and set the position of the Caption relative to the control. [C#] activeXControl.Alignment = Aspose.Cells.Drawing.ActiveXControls.ControlCaptionAlignmentType.Left; Indicates whether the contents of the control automatically wrap at the end of a line. [C#] if(activeXControl.IsWordWrapped == false) { activeXControl.IsWordWrapped = true; } Represents the ScrollBar control. [C#] //Initialize a new workbook. Workbook book = new Workbook(); //Add a ToggleButtonActiveXControl. Shape shape = book.Worksheets[0].Shapes.AddActiveXControl(ControlType.ScrollBar, 1, 0, 1, 0, 100, 50); ScrollBarActiveXControl activeXControl = (ScrollBarActiveXControl)shape.ActiveXControl; //do your business //Save the excel file. book.Save("exmaple.xlsx"); Gets the type of the ActiveX control. [C#] if(activeXControl.Type == Aspose.Cells.Drawing.ActiveXControls.ControlType.ScrollBar) { //do something } Gets and sets the amount by which the Position property changes [C#] activeXControl.LargeChange = 5; Represents the SpinButton control. [C#] //Initialize a new workbook. Workbook book = new Workbook(); //Add a ToggleButtonActiveXControl. Shape shape = book.Worksheets[0].Shapes.AddActiveXControl(ControlType.SpinButton, 1, 0, 1, 0, 100, 50); SpinButtonActiveXControl activeXControl = (SpinButtonActiveXControl)shape.ActiveXControl; //do your business //Save the excel file. book.Save("exmaple.xlsx"); Gets the type of the ActiveX control. [C#] if(activeXControl.Type == Aspose.Cells.Drawing.ActiveXControls.ControlType.SpinButton) { //do something } Gets and sets the minimum acceptable value. [C#] activeXControl.Min = 0; Gets and sets the maximum acceptable value. [C#] activeXControl.Max = 100; Gets and sets the value. [C#] activeXControl.Position = 30; Gets and sets the amount by which the Position property changes [C#] activeXControl.SmallChange = 5; Gets and sets whether the SpinButton or ScrollBar is oriented vertically or horizontally. [C#] if(activeXControl.Orientation == Aspose.Cells.Drawing.ActiveXControls.ControlScrollOrientation.Auto) { activeXControl.Orientation = Aspose.Cells.Drawing.ActiveXControls.ControlScrollOrientation.Horizontal; } Represents a text box ActiveX control. [C#] //Initialize a new workbook. Workbook book = new Workbook(); //Add a TextBoxActiveXControl. Shape shape = book.Worksheets[0].Shapes.AddActiveXControl(ControlType.TextBox, 1, 0, 1, 0, 100, 50); TextBoxActiveXControl activeXControl = (TextBoxActiveXControl)shape.ActiveXControl; //do your business //Save the excel file. book.Save("exmaple.xlsx"); Gets the type of the ActiveX control. [C#] Aspose.Cells.Drawing.ActiveXControls.ControlType type = activeXControl.Type; Gets and set the type of border used by the control. [C#] activeXControl.BorderStyle = Aspose.Cells.Drawing.ActiveXControls.ControlBorderType.Single; Gets and sets the ole color of the background. [C#] //excel default color system 12 or green(0x0000FF00) activeXControl.BorderOleColor = unchecked((int)0x80000012); Gets and sets the special effect of the control. [C#] activeXControl.SpecialEffect = Aspose.Cells.Drawing.ActiveXControls.ControlSpecialEffectType.Bump; Gets and sets the maximum number of characters [C#] if(activeXControl.MaxLength == 0) { activeXControl.MaxLength = 30; } Indicates specifies whether the control has vertical scroll bars, horizontal scroll bars, both, or neither. [C#] activeXControl.ScrollBars = Aspose.Cells.Drawing.ActiveXControls.ControlScrollBarType.BarsVertical; Gets and sets a character to be displayed in place of the characters entered. [C#] activeXControl.PasswordChar = 'a'; Indicates whether the user can type into the control. [C#] if(!activeXControl.IsEditable) { activeXControl.IsEditable = true; } Indicates whether the control will only show complete lines of text without showing any partial lines. [C#] if(!activeXControl.IntegralHeight) { activeXControl.IntegralHeight = true; } Indicates whether dragging and dropping is enabled for the control. [C#] if(!activeXControl.IsDragBehaviorEnabled) { activeXControl.IsDragBehaviorEnabled = true; } Specifies the behavior of the ENTER key. True specifies that pressing ENTER will create a new line. False specifies that pressing ENTER will move the focus to the next object in the tab order. [C#] if(!activeXControl.EnterKeyBehavior) { activeXControl.EnterKeyBehavior = true; } Specifies selection behavior when entering the control. True specifies that the selection remains unchanged from last time the control was active. False specifies that all the text in the control will be selected when entering the control. [C#] if(!activeXControl.EnterFieldBehavior) { activeXControl.EnterFieldBehavior = true; } Indicates whether tab characters are allowed in the text of the control. [C#] if(!activeXControl.TabKeyBehavior) { activeXControl.TabKeyBehavior = true; } Indicates whether selected text in the control appears highlighted when the control does not have focus. [C#] if(!activeXControl.HideSelection) { activeXControl.HideSelection = true; } Indicates whether the focus will automatically move to the next control when the user enters the maximum number of characters. [C#] if(!activeXControl.IsAutoTab) { activeXControl.IsAutoTab = true; } Indicates whether the control can display more than one line of text. [C#] if(!activeXControl.IsMultiLine) { activeXControl.IsMultiLine = true; } Specifies the basic unit used to extend a selection. True specifies that the basic unit is a single character. false specifies that the basic unit is a whole word. [C#] if(!activeXControl.IsAutoWordSelected) { activeXControl.IsAutoWordSelected = true; } Indicates whether the contents of the control automatically wrap at the end of a line. [C#] if(!activeXControl.IsWordWrapped) { activeXControl.IsWordWrapped = true; } Gets and set text of the control. [C#] activeXControl.Text = "This is a test."; Specifies the symbol displayed on the drop button [C#] activeXControl.DropButtonStyle = Aspose.Cells.Drawing.ActiveXControls.DropButtonStyle.Arrow; Specifies the symbol displayed on the drop button [C#] activeXControl.ShowDropButtonTypeWhen = Aspose.Cells.Drawing.ActiveXControls.ShowDropButtonType.Focus; Represents a ToggleButton ActiveX control. [C#] //Initialize a new workbook. Workbook book = new Workbook(); //Add a ToggleButtonActiveXControl. Shape shape = book.Worksheets[0].Shapes.AddActiveXControl(ControlType.ToggleButton, 1, 0, 1, 0, 100, 50); ToggleButtonActiveXControl activeXControl = (ToggleButtonActiveXControl)shape.ActiveXControl; //do your business //Save the excel file. book.Save("exmaple.xlsx"); Gets the type of the ActiveX control. [C#] Aspose.Cells.Drawing.ActiveXControls.ControlType type = activeXControl.Type; Gets and set the descriptive text that appears on a control. [C#] activeXControl.Caption = "ExampleButton"; Gets and set the location of the control's picture relative to its caption. [C#] activeXControl.PicturePosition = Aspose.Cells.Drawing.ActiveXControls.ControlPicturePositionType.AboveLeft; Gets and sets the special effect of the control. [C#] activeXControl.SpecialEffect = Aspose.Cells.Drawing.ActiveXControls.ControlSpecialEffectType.Bump; Gets and sets the data of the picture. [C#] //e.g byte[] data = File.ReadAllBytes("image.png"); byte[] data = null; if(activeXControl.Picture != null) { activeXControl.Picture = data; } Gets and sets the accelerator key for the control. [C#] if ('\0' != activeXControl.Accelerator) { activeXControl.Accelerator = '\0'; } Indicates if the control is checked or not. [C#] if(activeXControl.Value == CheckValueType.UnChecked) { activeXControl.Value = CheckValueType.Checked; } Indicates how the specified control will display Null values. Setting Description True The control will cycle through states for Yes, No, and Null values. The control appears dimmed (grayed) when its Value property is set to Null. False (Default) The control will cycle through states for Yes and No values. Null values display as if they were No values. [C#] activeXControl.IsTripleState = false; Unknow control. Gets the related data. The relationship id. Returns the related data. Gets and sets the binary data of the control. Gets the type of the ActiveX control. The Aspose.Cells.Drawing.ActiveXControls namespace provides classes that allow to draw and access ActiveXControl. Represents the arc shape. [C#] //Instantiate a new Workbook. Workbook excelbook = new Workbook(); //Add an arc shape. Aspose.Cells.Drawing.ArcShape arc1 = excelbook.Worksheets[0].Shapes.AddArc(2, 0, 2, 0, 130, 130); //Set the placement of the arc. arc1.Placement = PlacementType.FreeFloating; //Set the fill format. arc1.Fill.FillType = FillType.Solid; arc1.Fill.SolidFill.Color = Color.Blue; //Set the line style. arc1.Line.CompoundType = MsoLineStyle.Single; //Set the line weight. arc1.Line.Weight = 2; //Set the color of the arc line. arc1.Line.FillType = FillType.Solid; arc1.Line.SolidFill.Color = Color.Red; //Set the dash style of the arc. arc1.Line.DashStyle = MsoLineDashStyle.Solid; //Add another arc shape. Aspose.Cells.Drawing.ArcShape arc2 = excelbook.Worksheets[0].Shapes.AddArc(9, 0, 2, 0, 130, 130); //Set the placement of the arc. arc2.Placement = PlacementType.FreeFloating; //Set the line style. arc2.Line.CompoundType = MsoLineStyle.Single; //Set the line weight. arc2.Line.Weight = 1; //Set the color of the arc line. arc2.Line.FillType = FillType.Solid; arc2.Line.SolidFill.Color = Color.Blue; //Set the dash style of the arc. arc2.Line.DashStyle = MsoLineDashStyle.Solid; //Save the excel file. excelbook.Save("tstarcs.xls"); [VB..NET] 'Instantiate a new Workbook. Dim excelbook As Workbook = New Workbook() 'Add an arc shape. Dim arc1 As Aspose.Cells.Drawing.ArcShape = excelbook.Worksheets(0).Shapes.AddArc(2, 0, 2, 0, 130, 130) 'Set the placement of the arc. arc1.Placement = PlacementType.FreeFloating 'Set the fill format. arc1.Fill.FillType = FillType.Solid arc1.Fill.SolidFill.Color = Color.Blue 'Set the line style. arc1.Line.CompoundType = MsoLineStyle.Single 'Set the line weight. arc1.Line.Weight = 2 'Set the color of the arc line. arc1.Line.FillType = FillType.Solid arc1.Line.SolidFill.Color = Color.Red 'Set the dash style of the arc. arc1.Line.DashStyle = MsoLineDashStyle.Solid 'Add another arc shape. Dim arc2 As Aspose.Cells.Drawing.ArcShape = excelbook.Worksheets(0).Shapes.AddArc(9, 0, 2, 0, 130, 130) 'Set the placement of the arc. arc2.Placement = PlacementType.FreeFloating 'Set the line style. arc2.Line.CompoundType = MsoLineStyle.Single 'Set the line weight. arc2.Line.Weight = 1 'Set the color of the arc line. arc2.Line.FillType = FillType.Solid arc2.Line.SolidFill.Color = Color.Blue 'Set the dash style of the arc. arc2.Line.DashStyle = MsoLineDashStyle.Solid 'Save the excel file. excelbook.Save("tstarcs.xls") Gets and sets the begin arrow head style of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadStyle property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the begin arrow head width of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadWidth property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the begin arrow head length of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadLength property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the end arrow head style of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadStyle property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the end arrow head width of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadWidth property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the end arrow head length of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadLength property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Represents all built-in auto shape type. A value that SHOULD NOT be used. A plain text shape. An octagonal text shape. A triangular text shape pointing upwards. A triangular text shape pointing downwards. A chevron text shape pointing upwards. A chevron text shape pointing downwards. A circular text shape, as if reading an inscription on the inside of a ring. A circular text shape, as if reading an inscription on the outside of a ring. An upward arching curved text shape. A downward arching curved text shape. A circular text shape. A text shape that resembles a button. An upward arching text shape. A downward arching text shape. A circular text shape. A text shape that resembles a button. An upward curving text shape. A downward curving text shape. A cascading text shape pointed upwards. A cascading text shape pointed downwards. A wavy text shape. A wavy text shape. A wavy text shape. A wavy text shape. A text shape that expands vertically in the middle. A text shape that shrinks vertically in the middle. A text shape that expands downward in the middle. A text shape that shrinks upwards in the middle. A text shape that expands upward in the middle. A text shape that shrinks downward in the middle. A text shape where lower lines expand upward. Upper lines shrink to compensate. A text shape where lines in the center expand vertically. Upper and lower lines shrink to compensate. A text shape that shrinks vertically on the right side. A text shape that shrinks vertically on the left side. A text shape that shrinks horizontally on top. A text shape that shrinks horizontally on bottom. An upward slanted text shape. A downward slanted text shape. A text shape that is curved upwards as if being read on the side of a can. A text shape that is curved downwards as if being read on the side of a can. A shape enclosed in brackets. A shape enclosed in braces. This value SHOULD NOT be used. There is no such type in Excel There is no such type in Excel There is no such type in Excel There is no such type in Excel There is no such type in Excel Represents the auto shape and drawing object. Represents the shape of the chart. Properties and methods for the ChartObject object control the appearance and size of the embedded chart on the worksheet. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the first worksheet Worksheet worksheet = workbook.Worksheets[0]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(60); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(32); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.PieExploded, 5, 0, 25, 10); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", true); //Show Data Labels chart.NSeries[0].DataLabels.ShowValue = true; //Getting Chart Shape ChartShape chartShape = chart.ChartObject; //Set Lower Right Column chartShape.LowerRightColumn = 10; //Set LowerDeltaX chartShape.LowerDeltaX = 1024; //Saving the Excel file workbook.Save("book1.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the first worksheet Dim worksheet As Worksheet = workbook.Worksheets(0) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(60) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(32) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a chart to the worksheet Dim chartIndex As Integer = worksheet.Charts.Add(ChartType.PieExploded, 5, 0, 25, 10) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", True) 'Show Data Labels chart.NSeries(0).DataLabels.ShowValue = True 'Getting Chart Shape Dim chartShape As ChartShape = chart.ChartObject 'Set Lower Right Column chartShape.LowerRightColumn = 10 'Set LowerDeltaX chartShape.LowerDeltaX = 1024 'Saving the Excel file workbook.Save("book1.xls") Returns a Chart object that represents the chart contained in the object. Provides helper functions about color. Convert OLE_COLOR. The value of OLE_COLOR. The object. Convert color to OLE_COLOR The object. The value of OLE_COLOR Represents the shape of the comment. [C#] //source file string fileName = ""; //Instantiating a Workbook object Workbook workbook = new Workbook(fileName); ShapeCollection shapes = workbook.Worksheets[0].Shapes; //Check if a shape is CommentShape CommentShape commentShape = null; if (shapes[0].MsoDrawingType == Aspose.Cells.Drawing.MsoDrawingType.Comment) { //Represents the shape of the comment. commentShape = (CommentShape)shapes[0]; } //do your business Gets the comment object. [C#] Comment comment = commentShape.Comment; Represents Custom xml shape ,such as Ink. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); ShapeCollection shapes = workbook.Worksheets[0].Shapes; //add a CustomXmlShape Shape shape = shapes.AddShape(MsoDrawingType.CustomXml, 3, 0, 3, 0, 50, 150); //Check if a shape is CustomXmlShape CustomXmlShape customXmlShape = null; if (shapes[0].MsoDrawingType == Aspose.Cells.Drawing.MsoDrawingType.CustomXml) { //is CustomXmlShape customXmlShape = (CustomXmlShape)shapes[0]; } //do your business This class specifies a glow effect, in which a color blurred outline is added outside the edges of the object. Gets the color of the glow effect. Gets and sets the radius of the glow, in unit of points. NOTE: This member is now obsolete. Instead, please use GlowEffect.Size property. This property will be removed 6 months later since September 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the radius of the glow, in unit of points. Gets and sets the degree of transparency of the glow effect. Range from 0.0 (opaque) to 1.0 (clear). Represents how to position two rectangles relative to each other. Bottom BottomLeft BottomRight Center Left Right Top TopLeft TopRight This class specifies a reflection effect. Gets and sets the preset reflection effect. Gets and sets the degree of the starting reflection transparency as a value from 0.0 (opaque) through 1.0 (clear). Gets and sets the end position (along the alpha gradient ramp) of the end alpha value,in unit of percentage Gets and sets the blur radius,in unit of points. Gets and sets the direction of the alpha gradient ramp relative to the shape itself. Gets and sets how far to distance the shadow,in unit of points. Gets and sets the direction to offset the reflection. Gets and sets if the reflection should rotate with the shape. Represents the effect type of reflection. No reflection effect. Custom reflection effect. Tight reflection, touching. Half reflection, touching. Full reflection, touching. Tight reflection, 4 pt offset. Half reflection, 4 pt offset. Full reflection, 4 pt offset. Tight reflection, 8 pt offset. Half reflection, 8 pt offset. Full reflection, 8 pt offset. Represents preset shadow type. No shadow. Custom shadow. Outer shadow offset diagonal bottom right. Outer shadow offset bottom. Outer shadow offset diagonal bottom left. Outer shadow offset right. Outer shadow offset center. Outer shadow offset left. Outer shadow offset diagonal top right. Outer shadow offset top. Outer shadow offset diagonal top left. Inner shadow inside diagonal top Left. Inner shadow inside top. Inner shadow inside diagonal top right. Inner shadow inside left. Inner shadow inside center. Inner shadow inside right. Inner shadow inside diagonal bottom left. Inner shadow inside bottom. Inner shadow inside diagonal bottom right. Outer shadow perspective diagonal upper left. Outer shadow perspective diagonal upper right. Outer shadow below. Outer shadow perspective diagonal lower left. Outer shadow perspective diagonal lower right. This class specifies the shadow effect of the chart element or shape. Gets and sets the preset shadow type of the shadow. Gets and sets the color of the shadow. Gets and sets the degree of transparency of the shadow. Range from 0.0 (opaque) to 1.0 (clear). Gets and sets the size of the shadow. Range from 0 to 2.0. Meaningless in inner shadow. Gets and sets the blur of the shadow. Range from 0 to 100 points. Gets and sets the lighting angle. Range from 0 to 359.9 degrees. Gets and sets the distance of the shadow. Range from 0 to 200 points. Represents a bevel of a shape Gets and sets the width of the bevel, or how far into the shape it is applied. In unit of Points. Gets and sets the height of the bevel, or how far above the shape it is applied. In unit of Points. Gets and sets the preset bevel type. Represents a preset for a type of bevel which can be applied to a shape in 3D. No bevel Angle Art deco Circle Convex Cool slant Cross Divot Hard edge Relaxed inset Riblet Slope Soft round Represents a preset for a type of bevel which can be applied to a shape in 3D. No bevel Angle Art deco Circle Convex Cool slant Cross Divot Hard edge Relaxed inset Riblet Slope Soft round This class specifies the 3D shape properties for a chart element or shape. Gets the object that holds the properties associated with defining a bevel on the top or front face of a shape. Indicates if the shape has top bevel data. Gets and sets the material type which is combined with the lighting properties to give the final look and feel of a shape. Default value is PresetMaterialType.WarmMatte. Gets and sets the lighting type which is to be applied to the scene of the shape. Default value is LightRigType.ThreePoint. Gets and sets the lighting angle. Range from 0 to 359.9 degrees. Represents the light rig direction type. Bottom Bottom left. Bottom Right. Left. Right. Top. Top left. Top Right. Represents a preset light right that can be applied to a shape Balanced Bright room Chilly Contrasting Flat Flood Freezing Glow Harsh LegacyFlat1 LegacyFlat2 LegacyFlat3 LegacyFlat4 LegacyHarsh1 LegacyHarsh2 LegacyHarsh3 LegacyHarsh4 LegacyNormal1 LegacyNormal2 LegacyNormal3 LegacyNormal4 Morning Soft Sunrise Sunset Three point Two point No light rig. Represent different algorithmic methods for setting all camera properties, including position. Describes surface appearance of a shape. Clear Dark edge Flat Legacy matte Legacy metal Legacy plastic Legacy wireframe Matte Metal Plastic Powder Soft edge Soft metal Translucent powder Warm matte Represents a shape's three-dimensional formatting. Gets and sets the width of the bottom bevel, or how far into the shape it is applied. In unit of Points. Gets and sets the height of the bottom bevel, or how far into the shape it is applied. In unit of Points. Gets and sets the type of the bottom bevel, or how far into the shape it is applied. In unit of Points. Gets and sets the width of the top bevel, or how far into the shape it is applied. In unit of Points. Gets and sets the height of the top bevel, or how far into the shape it is applied. In unit of Points. Gets and sets the type of the top bevel, or how far into the shape it is applied. In unit of Points. Represents the preset material which is combined with the lighting properties to give the final look and feel of a shape. Gets and sets the contour color on a shape. Gets and sets the contour width on the shape, in unit of points. Gets the extrusion color on a shape. Gets and sets the extrusion height of the applied to the shape, in unit of points. Defines the distance from ground for the 3D shape. Gets and sets the angle of the extrusion lights. Gets and sets type of light rig. Gets and sets the direction from which the light rig is oriented in relation to the scene. Gets and sets the angle at which a ThreeDFormat object can be viewed. Gets and sets the rotation of the extruded shape around the x-axis in degrees. Gets and sets the rotation of the extruded shape around the y-axis in degrees. Gets and sets the rotation of the extruded shape around the z-axis in degrees. Gets and sets the extrusion preset camera type. Gets hashcode. represents automatic fill. Represents the fill format of the shape. / Gets the hash code. Encapsulates the object that represents fill formatting for a shape. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Excel object int sheetIndex = workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[sheetIndex]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "A4" cell worksheet.Cells["A4"].PutValue(200); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(60); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(32); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a sample value to "B4" cell worksheet.Cells["B4"].PutValue(40); //Adding a sample value to "C1" cell as category data worksheet.Cells["C1"].PutValue("Q1"); //Adding a sample value to "C2" cell as category data worksheet.Cells["C2"].PutValue("Q2"); //Adding a sample value to "C3" cell as category data worksheet.Cells["C3"].PutValue("Y1"); //Adding a sample value to "C4" cell as category data worksheet.Cells["C4"].PutValue("Y2"); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4" int seriesIndex = chart.NSeries.Add("A1:B4", true); //Setting the data source for the category data of NSeries chart.NSeries.CategoryData = "C1:C4"; //Filling the area of the 2nd NSeries with a gradient chart.NSeries[seriesIndex].Area.FillFormat.SetOneColorGradient(Color.Lime, 1, GradientStyleType.Horizontal, 1); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Excel object Dim sheetIndex As Int32 = workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "A4" cell worksheet.Cells("A4").PutValue(200) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(60) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(32) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a sample value to "B4" cell worksheet.Cells("B4").PutValue(40) 'Adding a sample value to "C1" cell as category data worksheet.Cells("C1").PutValue("Q1") 'Adding a sample value to "C2" cell as category data worksheet.Cells("C2").PutValue("Q2") 'Adding a sample value to "C3" cell as category data worksheet.Cells("C3").PutValue("Y1") 'Adding a sample value to "C4" cell as category data worksheet.Cells("C4").PutValue("Y2") 'Adding a chart to the worksheet Dim chartIndex As Int32 = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4" Dim seriesIndex As Int32 = chart.NSeries.Add("A1:B4", True) 'Setting the data source for the category data of NSeries chart.NSeries.CategoryData = "C1:C4" 'Filling the area of the 2nd NSeries with a gradient chart.NSeries(seriesIndex).Area.FillFormat.SetOneColorGradient(Color.Lime, 1, GradientStyleType.Horizontal, 1) Gets and sets the fill type. NOTE: This member is now obsolete. Instead, please use FillFormat.FillType property instead. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets fill type Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear). Gets the fill format set type. NOTE: This member is now obsolete. Instead, please use FillFormat.FillType property instead. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced. Gets object. Gets object. Gets object. Gets object. Returns the gradient color type for the specified fill. Returns the gradient style for the specified fill. Returns the gradient color 1 for the specified fill. Returns the gradient color 2 for the specified fill. Only when the gradient color type is GradientColorType.TwoColors, this property is meaningful. Returns the gradient degree for the specified fill. Only applies for Excel 2007. Can only be a value from 0.0 (dark) through 1.0 (light). Returns the gradient variant for the specified fill. Only applies for Excel 2007. Can only be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2. Returns the gradient preset color for the specified fill. Sets the specified fill to a one-color gradient. Only applies for Excel 2007. One gradient color. The gradient degree. Can be a value from 0.0 (dark) through 1.0 (light). Gradient shading style. The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2. Sets the specified fill to a two-color gradient. Only applies for Excel 2007. One gradient color. Two gradient color. Gradient shading style. The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2. Sets the specified fill to a two-color gradient. Only applies for Excel 2007. One gradient color. The degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear). Two gradient color. The degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear). Gradient shading style. The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2. Sets the specified fill to a preset-color gradient. Only applies for Excel 2007. Preset color type Gradient shading style. The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2. Represents the texture type for the specified fill. Represents an area's display pattern. Gets and sets the picture format type. Gets and sets the picture format scale. Gets and sets the picture image data. If the fill format is not custom texture format, returns null. Gets the hash code. Enumerates shape fill pattern types. Represents no background. Represents solid pattern. Represents 5% gray pattern. Represents 10% gray pattern. Represents 20% gray pattern. Represents 30% gray pattern. Represents 40% gray pattern. Represents 50% gray pattern. Represents 60% gray pattern. Represents 70% gray pattern. Represents 75% gray pattern. Represents 80% gray pattern. Represents 90% gray pattern. Represents 25% gray pattern. Represents light downward diagonal pattern. Represents light upward diagonal pattern. Represents dark downward diagonal pattern. Represents dark upward diagonal pattern. Represents wide downward diagonal pattern. Represents wide upward diagonal pattern. Represents light vertical pattern. Represents light horizontal pattern. Represents narrow vertical pattern. Represents narrow horizontal pattern. Represents dark vertical pattern. Represents dark horizontal pattern. Represents dashed downward diagonal pattern. Represents dashed upward diagonal pattern. Represents dashed vertical pattern. Represents dashed horizontal pattern. Represents small confetti pattern. Represents large confetti pattern. Represents zig zag pattern. Represents wave pattern. Represents diagonal brick pattern. Represents horizontal brick pattern. Represents weave pattern. Represents plaid pattern. Represents divot pattern. Represents dotted grid pattern. Represents dotted diamond pattern. Represents shingle pattern. Represents trellis pattern. Represents sphere pattern. Represents small grid pattern. Represents large grid pattern. Represents small checker board pattern. Represents large checker board pattern. Represents outlined diamond pattern. Represents solid diamond pattern. Represents unknown pattern. Represents the picture fill type. Stretch Stack StackAndScale Fill format type. Represents automatic formatting type. Represents none formatting type. Solid fill format. Gradient fill format. Texture fill format(includes picture fill). Pattern fill format. Inherit the fill properties of the group. Represents the gradient color type for the specified fill. No gradient color One gradient color Preset gradient colors Two gradient colors Represents all direction type of gradient. FromUpperLeftCorner FromUpperRightCorner FromLowerLeftCorner FromLowerRightCorner FromCenter Unknown Represents the gradient fill. Represents the gradient stop collection. Set the gradient fill type and direction. Gradient fill type. The angle. Only applies for GradientFillType.Linear. The direction type. Only applies for GradientFillType.Radial and GradientFillType.Rectangle. Gets the gradient fill type. Gets the gradient direction type. The angle of linear fill. Sets preset theme gradient fill. The preset gradient type. The theme color type. Sets the specified fill to a one-color gradient. Only applies for Excel 2007. One gradient color. The gradient degree. Can be a value from 0.0 (dark) through 1.0 (light). Gradient shading style. The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2. Sets the specified fill to a two-color gradient. Only applies for Excel 2007. One gradient color. Two gradient color. Gradient shading style. The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2. Sets the specified fill to a two-color gradient. Only applies for Excel 2007. One gradient color. The degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear). Two gradient color. The degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear). Gradient shading style. The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2. Represents all Gradient fill type. Linear Radial Rectangle Path Represents gradient preset color type. Brass preset color Calm Water preset color Chrome preset color Chrome II preset color Daybreak preset color Desert preset color Early Sunset preset color Fire preset color Fog preset color Gold preset color Gold II preset color Horizon preset color Late Sunset preset color Mahogany preset color Moss preset color Nightfall preset color Ocean preset color Parchment preset color Peacock preset color Rainbow preset color Rainbow II preset color Sapphire preset color Silver preset color Wheat preset color Unknown preset color. Only for the preset color (which is not same as any known preset color) in the template workbook. Represents the gradient stop. The position of the stop. Gets the color of this gradient stop. Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear). Represents the gradient stop collection. Add a gradient stop. The position of the stop,in unit of percentage. The color of the stop. The alpha of the color. Add a gradient stop. The position of the stop,in unit of percentage. The color of the stop. The alpha of the color. Gets the gradient stop by the index. The index. The gradient stop. Represents gradient shading style. Diagonal down shading style Diagonal up shading style From center shading style From corner shading style Horizontal shading style Vertical shading style Unknown shading style.Only for the shading style(which is not for any member of the GradientStyleType) in the template file. Represents this fill format should inherit the fill properties of the group. Represents mirror type of texture fill None Horizonal Vertical Both Represents no fill. Encapsulates the object that represents pattern fill format Gets or sets the fill pattern type Gets or sets the background of the . Gets and sets the foreground object. Gets or sets the foreground . Gets and sets the foreground object. Gets or sets the transparency of foreground color. Gets or sets the transparency of background color. Represents picture format option Gets or sets the picture fill type. Gets or sets how many the picture stack and scale with. Gets or sets the left offset for stretching picture. Gets or sets the top offset for stretching picture. Gets or sets the bottom offset for stretching picture. Gets or sets the right offset for stretching picture. Represents the preset theme gradient type. Light gradient Top spotlight Medium gradient Bottom spotlight Radial gradient Encapsulates the object that represents solid fill format Gets or sets the . Gets and sets the object. Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear). Gets the hash code. Encapsulates the object that represents texture fill format Gets and sets the texture type Gets and sets the image data of the fill. Indicates whether tile picture as texture. Gets or sets picture format option. Gets or sets tile picture option. Gets and sets the picture format type. Gets and sets the picture format scale. Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear). Represents the preset texture type. Represents Blue Tissue Paper texture type. Represents Bouquet texture type. Represents Brown Marble texture type. Represents Canvas texture type. Represents Cork texture type. Represents Denim texture type. Represents Fish Fossil texture type. Represents Granite texture type. Represents Green Marble texture type. Represents Medium Wood texture type. Represents Newsprint texture type. Represents Oak texture type. Represents Paper Bag texture type. Represents Papyrus texture type. Represents Parchment texture type. Represents Pink Tissue Paper texture type. Represents Purple Mesh texture type. Represents Recycled Paper texture type. Represents Sand texture type. Represents Stationery texture type. Represents Walnut Droplets texture type. Represents Water Droplets texture type. Represents White Marble texture type. Represents Woven Mat texture type. Represents Unknown texture type. Represents the Forms control: Button [C#] //Create a new Workbook. Workbook workbook = new Workbook(); //Get the first worksheet in the workbook. Worksheet sheet = workbook.Worksheets[0]; //Add a new button to the worksheet. Aspose.Cells.Drawing.Button button = sheet.Shapes.AddButton(2, 0, 2, 0, 28, 80); //Set the caption of the button. button.Text = "Aspose"; //Set the Placement Type, the way the //button is attached to the cells. button.Placement = PlacementType.FreeFloating; //Set the font name. button.Font.Name = "Tahoma"; //Set the caption string bold. button.Font.IsBold = true; //Set the color to blue. button.Font.Color = Color.Blue; //Set the hyperlink for the button. button.AddHyperlink("http://www.aspose.com/"); //Saves the file. workbook.Save(@"tstbutton.xls"); [VB.NET] 'Create a new Workbook. Dim workbook As Workbook = New Workbook() 'Get the first worksheet in the workbook. Dim sheet As Worksheet = workbook.Worksheets(0) 'Add a new button to the worksheet. Dim button As Aspose.Cells.Drawing.Button = sheet.Shapes.AddButton(2, 0, 2, 0, 28, 80) 'Set the caption of the button. button.Text = "Aspose" 'Set the Placement Type, the way the 'button is attached to the cells. button.Placement = PlacementType.FreeFloating 'Set the font name. button.Font.Name = "Tahoma" 'Set the caption string bold. button.Font.IsBold = True 'Set the color to blue. button.Font.Color = Color.Blue 'Set the hyperlink for the button. button.AddHyperlink("http://www.aspose.com/") 'Saves the file. workbook.Save("tstbutton.xls") Represents a check box object in a worksheet. [C#] //Instantiate a new Workbook. Workbook excel = new Workbook(); int index = excel.Worksheets[0].CheckBoxes.Add(15, 15, 20, 100); CheckBox checkBox = excel.Worksheets[0].CheckBoxes[index]; checkBox.Text = "Check Box 1"; //Save the excel file. excel.Save("checkBox.xlsx"); [Visual Basic] Dim excel As Workbook = new Workbook() Dim index as integer = excel.Worksheets(0).CheckBoxes.Add(15, 15, 20, 100) Dim checkBox as CheckBox = excel.Worksheets(0).CheckBoxes[index]; checkBox.Text = "Check Box 1" excel.Save("checkBox.xlsx") Indicates if the checkbox is checked or not. Gets or set checkbox' value. NOTE: This member is now obsolete. Instead, please use CheckBox.CheckValueType property. This property will be removed 12 months later since June 2010. Aspose apologizes for any inconvenience you may have experienced. Gets or set checkbox' value. Indicates whether the combobox has 3-D shading. Represents a collection of objects in a worksheet. [C#] //Create a new Workbook. Workbook workbook = new Workbook(); //Get the first worksheet in the workbook. Worksheet sheet = workbook.Worksheets[0]; int index = sheet.CheckBoxes.Add(15, 15, 20, 100); CheckBox checkBox = sheet.CheckBoxes[index]; checkBox.Text = "Check Box 1"; [Visual Basic] 'Create a new Workbook. Dim workbook As Workbook = new Workbook() 'Get the first worksheet in the workbook. Dim sheet As Worksheet = workbook.Worksheets(0) Dim index as integer = sheet.CheckBoxes.Add(15, 15, 20, 100) Dim checkBox as CheckBox = sheet.CheckBoxes[index]; checkBox.Text = "Check Box 1" Adds a checkBox to the collection. Upper left row index. Upper left column index. Height of checkBox, in unit of pixel. Width of checkBox, in unit of pixel. object index. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Represents the check value type of the check box. UnChecked Checked Mixed Represents the control form ComboBox. [C#] //Create a new Workbook. Workbook workbook = new Workbook(); //Get the first worksheet. Worksheet sheet = workbook.Worksheets[0]; //Get the worksheet cells collection. Cells cells = sheet.Cells; //Input a value. cells["B3"].PutValue("Employee:"); //Set it bold. Style style = cells["B3"].GetStyle(); style.Font.IsBold = true; cells["B3"].SetStyle(style); //Input some values that denote the input range //for the combo box. cells["A2"].PutValue("Emp001"); cells["A3"].PutValue("Emp002"); cells["A4"].PutValue("Emp003"); cells["A5"].PutValue("Emp004"); cells["A6"].PutValue("Emp005"); cells["A7"].PutValue("Emp006"); //Add a new combo box. Aspose.Cells.Drawing.ComboBox comboBox = sheet.Shapes.AddComboBox(2, 0, 2, 0, 22, 100); //Set the linked cell; comboBox.LinkedCell = "A1"; //Set the input range. comboBox.InputRange = "A2:A7"; //Set no. of list lines displayed in the combo //box's list portion. comboBox.DropDownLines = 5; //Set the combo box with 3-D shading. comboBox.Shadow = true; //AutoFit Columns sheet.AutoFitColumns(); //Saves the file. workbook.Save(@"tstcombobox.xls"); [VB.NET] 'Create a new Workbook. Dim workbook As Workbook = New Workbook() 'Get the first worksheet. Dim sheet As Worksheet = workbook.Worksheets(0) 'Get the worksheet cells collection. Dim cells As Cells = sheet.Cells 'Input a value. cells("B3").PutValue("Employee:") 'Set it bold. Dim style As Style = cells("B3").GetStyle() style.Font.IsBold = true cells("B3").SetStyle(style) 'Input some values that denote the input range 'for the combo box. cells("A2").PutValue("Emp001") cells("A3").PutValue("Emp002") cells("A4").PutValue("Emp003") cells("A5").PutValue("Emp004") cells("A6").PutValue("Emp005") cells("A7").PutValue("Emp006") 'Add a new combo box. Dim comboBox As Aspose.Cells.Drawing.ComboBox = sheet.Shapes.AddComboBox(2, 0, 2, 0, 22, 100) 'Set the linked cell; comboBox.LinkedCell = "A1" 'Set the input range. comboBox.InputRange = "A2:A7" 'Set no. of list lines displayed in the combo 'box's list portion. comboBox.DropDownLines = 5 'Set the combo box with 3-D shading. comboBox.Shadow = True 'AutoFit Columns sheet.AutoFitColumns() 'Saves the file. workbook.Save("tstcombobox.xls") Gets or sets the index number of the currently selected item in a list box or combo box. Zero-based. -1 presents no item is selected. Gets the selected value of the combox box. Gets the selected cell in the input range of the combo box. Indicates whether the combobox has 3-D shading. Gets or sets the number of list lines displayed in the drop-down portion of a combo box. Represents the dialog box. Encapsulates the object that represents a groupbox in a spreadsheet. [C#] //Instantiate a new Workbook. Workbook excelbook = new Workbook(); //Add a group box to the first worksheet. GroupBox box = excelbook.Worksheets[0].Shapes.AddGroupBox(1, 0, 1, 0, 300, 250); //Set the caption of the group box. box.Text = "Age Groups"; box.Placement = PlacementType.FreeFloating; //Make it 2-D box. box.Shadow = false; //Save the excel file. excelbook.Save("groupbox.xls"); [VB.NET] 'Instantiate a new Workbook. Dim excelbook As Workbook = New Workbook() 'Add a group box to the first worksheet. Dim box As GroupBox = excelbook.Worksheets(0).Shapes.AddGroupBox(1, 0, 1, 0, 300, 250) 'Set the caption of the group box. box.Text = "Age Groups" box.Placement = PlacementType.FreeFloating 'Make it 2-D box. box.Shadow = False 'Save the excel file. excelbook.Save("groupbox.xls") Indicates whether the groupbox has shadow. Encapsulates the object that represents a label in a spreadsheet. //Create a new Workbook. Workbook workbook = new Workbook(); //Get the first worksheet in the workbook. Worksheet sheet = workbook.Worksheets[0]; //Add a new label to the worksheet. Aspose.Cells.Drawing.Label label = sheet.Shapes.AddLabel(2, 0, 2, 0, 60, 120); //Set the caption of the label. label.Text = "This is a Label"; //Set the Placement Type, the way the //label is attached to the cells. label.Placement = PlacementType.FreeFloating; //Set the fill color of the label. label.Fill.FillType = FillType.Solid; label.Fill.SolidFill.Color = Color.Yellow; //Saves the file. workbook.Save("tstlabel.xls"); [VB.NET] 'Create a new Workbook. Dim workbook As Workbook = New Workbook() 'Get the first worksheet in the workbook. Dim sheet As Worksheet = workbook.Worksheets(0) 'Add a new label to the worksheet. Dim label As Aspose.Cells.Drawing.Label = sheet.Shapes.AddLabel(2, 0, 2, 0, 60, 120) 'Set the caption of the label. label.Text = "This is a Label" 'Set the Placement Type, the way the 'label is attached to the cells. label.Placement = PlacementType.FreeFloating 'Set the fill color of the label. label.Fill.FillType = FillType.Solid label.Fill.SolidFill.Color = Color.Yellow 'Saves the file. workbook.Save("tstlabel.xls") Represents a list box object. [C#] //Create a new Workbook. Workbook workbook = new Workbook(); //Get the first worksheet. Worksheet sheet = workbook.Worksheets[0]; //Get the worksheet cells collection. Cells cells = sheet.Cells; //Input a value. cells["B3"].PutValue("Choose Dept:"); //Set it bold. Style style = cells["B3"].GetStyle(); style.Font.IsBold = true; cells["B3"].SetStyle(style); //Input some values that denote the input range //for the list box. cells["A2"].PutValue("Sales"); cells["A3"].PutValue("Finance"); cells["A4"].PutValue("MIS"); cells["A5"].PutValue("R&D"); cells["A6"].PutValue("Marketing"); cells["A7"].PutValue("HRA"); //Add a new list box. ListBox listBox = sheet.Shapes.AddListBox(2, 0, 3, 0, 122, 100); //Set the placement type. listBox.Placement = PlacementType.FreeFloating; //Set the linked cell. listBox.LinkedCell = "A1"; //Set the input range. listBox.InputRange = "A2:A7"; //Set the selection style. listBox.SelectionType = SelectionType.Single; //Set the list box with 3-D shading. listBox.Shadow = true; //Saves the file. workbook.Save(@"tstlistbox.xls"); [VB.NET] 'Create a new Workbook. Dim workbook As Aspose.Cells.Workbook = New Aspose.Cells.Workbook() 'Get the first worksheet. Dim sheet As Worksheet = workbook.Worksheets(0) 'Get the worksheet cells collection. Dim cells As Cells = sheet.Cells 'Input a value. cells("B3").PutValue("Choose Dept:") 'Set it bold. Dim style As Style = cells("B3").GetStyle() style.Font.IsBold = True cells("B3").SetStyle(style) 'Input some values that denote the input range 'for the list box. cells("A2").PutValue("Sales") cells("A3").PutValue("Finance") cells("A4").PutValue("MIS") cells("A5").PutValue("R&D") cells("A6").PutValue("Marketing") cells("A7").PutValue("HRA") 'Add a new list box. Dim listBox As Aspose.Cells.ListBox = sheet.Shapes.AddListBox(2, 0, 3, 0, 122, 100) 'Set the placement type. listBox.Placement = PlacementType.FreeFloating 'Set the linked cell. listBox.LinkedCell = "A1" 'Set the input range. listBox.InputRange = "A2:A7" 'Set the selection tyle. listBox.SelectionType = SelectionType.Single 'Set the list box with 3-D shading. listBox.Shadow = True 'Saves the file. workbook.Save("tstlistbox.xls") Gets the number of items in the list box. Gets or sets the index number of the currently selected item in a list box or combo box. Zero-based. -1 presents no item is selected. Sets whether the item is selected The item index Whether the item is selected. True means that this item should be selected. False means that this item should be unselected. Indicates whether the item is selected. The item index. whether the item is selected. Gets the selected cells. Returns null if the input range is not set or no item is selected Indicates whether the combobox has 3-D shading. Gets or sets the selection mode of the specified list box. Specifies the amount by which the control's value is changed when the user clicks on the scrollbar's page up or page down region. Represents a radio button. Indicates if the radiobutton is checked or not. Gets the option index (one-based) in all the radio buttons of the GroupBox which contains this radio button. If this radio button is not in the GroupBox, returns the option index in all radio buttons that are not in any GroupBox Indicates whether the combobox has 3-D shading. Gets the GroupBox that contains this RadioButton. Represents a scroll bar object. Scroll value must be between 0 and 30000. Gets or sets the current value. Gets or sets the minimum value of a scroll bar or spinner range. Gets or sets the maximum value of a scroll bar or spinner range. Gets or sets the amount that the scroll bar or spinner is incremented a line scroll. Gets or sets page change Indicates whether the shape has 3-D shading. Indicates whether this is a horizontal scroll bar. The selection type of list box. Sigle selection type. Multiple selection type. Extend selection type. Represents the Forms control: Spinner. Scroll value must be between 0 and 30000. Gets or sets the current value. Gets or sets the minimum value of a scroll bar or spinner range. Gets or sets the maximum value of a scroll bar or spinner range. Gets or sets the amount that the scroll bar or spinner is incremented a line scroll. Indicates whether the shape has 3-D shading. Indicates whether this is a horizontal scroll bar. Represents the shape guide. Represents a custom geometric shape. Gets path collection information when shape is a NotPrimitive autoshape Represents a geometric shape. Gets a collection of shape adjust value Encapsulates a shape guide specifies the presence of a shape guide that will be used to govern the geometry of the specified shape Gets or sets value of this guide Encapsulates a collection of shape guide Adds a shape guide.(Important: This feature is currently only available for Excel07 and above) the name of adjust. It's as "adj(Used when there is only one adjustment value)", "adj1", "adj2", "adj3" and so on. the value of adjust Gets a shape guide by index Represents a creation path consisting of a series of moves, lines and curves that when combined will form a geometric shape. Gets list Initializes a new instance of the class. Starts a new figure from the specified point without closing the current figure. All subsequent points added to the path are added to this new figure. The x-coordinate of the starting point of the figure. The y-coordinate of the starting point of the figure. Appends a line segment to the current figure. The starting point is the end point of the current figure. The x-coordinate of the endpoint of the line segment. The y-coordinate of the endpoint of the line segment. Appends a cubic Bézier curve to the current figure. The starting point is the end point of the current figure. The x-coordinate of the first control point for the curve. The y-coordinate of the first control point for the curve. The x-coordinate of the second control point for the curve. The y-coordinate of the second control point for the curve. The x-coordinate of the endpoint of the curve. The y-coordinate of the endpoint of the curve. Appends an elliptical arc to the current figure. The starting point is the end point of the current figure. The half-width of the rectangular area of ​​the ellipse that draws the arc. The half-height of the rectangular area of ​​the ellipse that draws the arc. The starting angle of the arc, measured in degrees clockwise from the x-axis. The angle between startAngle and the end of the arc. Closes the current figure and starts a new figure. If the current figure contains a sequence of connected lines and curves, the method closes the loop by connecting a line from the endpoint to the starting point. Represents path collection information in NotPrimitive autoshape Gets the count of paths Gets a creation path. The index. Returns object. Add a creation path. Returns object. Represents an x-y coordinate within the path coordinate space. Gets and sets x coordinate for this position coordinate. Gets y coordinate for this position coordinate. Represents all shape path points. Gets shape path point by index. The index Returns object Adds a path point. The x coordinate. The y coordinate. Represents path segment type. Straight line segment Cubic Bezier curve Start a new path If the starting POINT and the end POINT are not the same, a single straight line is drawn to connect the starting POINT and ending POINT of the path. The end of the current path Escape An arc Unknown This class specifies the visual shape properties for a chart element or shape. Represents a object that specifies glow effect for the chart element or shape. Clears the glow effect of the shape. Indicates if the shape has glow effect data. Represents a object that specifies 3D shape properties for the chart element or shape. Indicates if the shape has 3d format data. Clears the 3D shape properties of the shape. Gets and sets the radius of blur to apply to the edges, in unit of points. Represents a object that specifies shadow effect for the chart element or shape. Clears the shadow effect of the chart element or shape. Indicates if the shape has shadow effect data. Represents a segment path in a path of the freeform. Gets the path segment type Gets the points in path segment Represents a creation path consisting of a series of moves, lines and curves that when combined will form a geometric shape. Add a segment path in creation path. The path type. Returns the position of object in the list. Gets object. The index. Returns a object. just for vml Encapsulates a shape guide specifies the presence of a shape guide that will be used to govern the geometry of the specified shape Represents the group shape which contains the individual shapes. [C#] //Instantiate a new Workbook. Workbook excelbook = new Workbook(); //Add a group box to the first worksheet. GroupBox box = excelbook.Worksheets[0].Shapes.AddGroupBox(1, 0, 1, 0, 300, 250); //Set the caption of the group box. box.Text = "Age Groups"; box.Placement = PlacementType.FreeFloating; //Make it 2-D box. box.Shadow = false; //Add a radio button. RadioButton radio1 = excelbook.Worksheets[0].Shapes.AddRadioButton(3, 0, 2, 0, 30, 110); //Set its text string. radio1.Text = "20-29"; //Set A1 cell as a linked cell for the radio button. radio1.LinkedCell = "A1"; //Make the radio button 3-D. radio1.Shadow = true; //Make the line format visible. radio1.Line.FillType = FillType.Solid; //Make the fill format visible. radio1.Fill.FillType = FillType.Solid; //Set the foreground color of the radio button. radio1.Fill.SolidFill.Color = Color.LightGreen; //Set the line style of the radio button. radio1.Line.CompoundType = MsoLineStyle.ThickThin; //Set the weight of the radio button. radio1.Line.Weight = 4; //Set the line color of the radio button. radio1.Line.SolidFill.Color = Color.Blue; //Set the dash style of the radio button. radio1.Line.DashStyle = MsoLineDashStyle.Solid; //Add another radio button. RadioButton radio2 = excelbook.Worksheets[0].Shapes.AddRadioButton(6, 0, 2, 0, 30, 110); //Set its text string. radio2.Text = "30-39"; //Set A1 cell as a linked cell for the radio button. radio2.LinkedCell = "A1"; //Make the radio button 3-D. radio2.Shadow = true; //Make the line format visible. radio2.Line.FillType = FillType.Solid; //Make the fill format visible. radio2.Fill.FillType = FillType.Solid; //Set the foreground color of the radio button. radio2.Fill.SolidFill.Color = Color.LightGreen; //Set the line style of the radio button. radio2.Line.CompoundType = MsoLineStyle.ThickThin; //Set the weight of the radio button. radio2.Line.Weight = 4; //Set the line color of the radio button. radio2.Line.SolidFill.Color = Color.Blue; //Set the dash style of the radio button. radio2.Line.DashStyle = MsoLineDashStyle.Solid; //Add another radio button. RadioButton radio3 = excelbook.Worksheets[0].Shapes.AddRadioButton(9, 0, 2, 0, 30, 110); //Set its text string. radio3.Text = "40-49"; //Set A1 cell as a linked cell for the radio button. radio3.LinkedCell = "A1"; //Make the radio button 3-D. radio3.Shadow = true; //Make the line format visible. radio3.Line.FillType = FillType.Solid; //Make the fill format visible. radio3.Fill.FillType = FillType.Solid; //Set the foreground color of the radio button. radio3.Fill.SolidFill.Color = Color.LightGreen; //Set the line style of the radio button. radio3.Line.CompoundType = MsoLineStyle.ThickThin; //Set the weight of the radio button. radio3.Line.Weight = 4; //Set the line color of the radio button. radio3.Line.SolidFill.Color = Color.Blue; //Set the dash style of the radio button. radio3.Line.DashStyle = MsoLineDashStyle.Solid; //Get the shapes. Shape[] shapeobjects = new Shape[] { box, radio1, radio2, radio3 }; //Group the shapes. GroupShape group = excelbook.Worksheets[0].Shapes.Group(shapeobjects); //Save the excel file. excelbook.Save("groupshapes.xls"); [VB.NET] 'Instantiate a new Workbook. Dim excelbook As Workbook = New Workbook() 'Add a group box to the first worksheet. Dim box As GroupBox = excelbook.Worksheets(0).Shapes.AddGroupBox(1, 0, 1, 0, 300, 250) 'Set the caption of the group box. box.Text = "Age Groups" box.Placement = PlacementType.FreeFloating 'Make it 2-D box. box.Shadow = False 'Add a radio button. Dim radio1 As RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton(3, 0, 2, 0, 30, 110) 'Set its text string. radio1.Text = "20-29" 'Set A1 cell as a linked cell for the radio button. radio1.LinkedCell = "A1" 'Make the radio button 3-D. radio1.Shadow = True 'Make the fill format visible. radio1.Fill.FillType = FillType.Solid 'Set the foreground color of the radio button. radio1.Fill.SolidFill.Color = Color.LightGreen 'Make the line format visible. radio1.Line.FillType = FillType.Solid 'Set the line style of the radio button. radio1.Line.CompoundType = MsoLineStyle.ThickThin 'Set the weight of the radio button. radio1.Line.Weight = 4 'Set the line color of the radio button. radio1.Line.SolidFill.Color = Color.Blue 'Set the dash style of the radio button. radio1.Line.DashStyle = MsoLineDashStyle.Solid 'Add another radio button. Dim radio2 As RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton(6, 0, 2, 0, 30, 110) 'Set its text string. radio2.Text = "30-39" 'Set A1 cell as a linked cell for the radio button. radio2.LinkedCell = "A1" 'Make the radio button 3-D. radio2.Shadow = True 'Make the fill format visible. radio2.Fill.FillType = FillType.Solid 'Set the foreground color of the radio button. radio2.Fill.SolidFill.Color = Color.LightGreen 'Make the line format visible. radio2.Line.FillType = FillType.Solid 'Set the line style of the radio button. radio2.Line.CompoundType = MsoLineStyle.ThickThin 'Set the weight of the radio button. radio2.Line.Weight = 4 'Set the line color of the radio button. radio2.Line.SolidFill.Color = Color.Blue 'Set the dash style of the radio button. radio2.Line.DashStyle = MsoLineDashStyle.Solid 'Add another radio button. Dim radio3 As RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton(9, 0, 2, 0, 30, 110) 'Set its text string. radio3.Text = "40-49" 'Set A1 cell as a linked cell for the radio button. radio3.LinkedCell = "A1" 'Make the radio button 3-D. radio3.Shadow = True 'Make the fill format visible. radio3.Fill.FillType = FillType.Solid 'Set the foreground color of the radio button. radio3.Fill.SolidFill.Color = Color.LightGreen 'Make the line format visible. radio3.Line.FillType = FillType.Solid 'Set the line style of the radio button. radio3.Line.CompoundType = MsoLineStyle.ThickThin 'Set the weight of the radio button. radio3.Line.Weight = 4 'Set the line color of the radio button. radio3.Line.SolidFill.Color = Color.Blue 'Set the dash style of the radio button. radio3.Line.DashStyle = MsoLineDashStyle.Solid 'Get the shapes. Dim shapeobjects() As Shape = New Shape() {box, radio1, radio2, radio3} 'Group the shapes. Dim group As GroupShape = excelbook.Worksheets(0).Shapes.Group(shapeobjects) 'Save the excel file. excelbook.Save("groupshapes.xls") Gets the child shape by index. the child shape index. return the child shape. Ungroups the shape items. If the group shape is grouped by another group shape,nothing will be done. Gets the shapes grouped by this shape. Specifies the type (format) of an image. An unknown image type. Windows Enhanced Metafile. Windows Metafile. Macintosh PICT. JPEG JFIF. Portable Network Graphics. Windows Bitmap Gif Tiff Svg Svm glTF Windows Enhanced Metafile which is more compatible with Office. Weppy image format Represents the line shape. [C#] //Instantiate a new Workbook. Workbook workbook = new Workbook(); //Get the first worksheet in the book. Worksheet worksheet = workbook.Worksheets[0]; //Add a new line to the worksheet. Aspose.Cells.Drawing.LineShape line1 = worksheet.Shapes.AddLine(5, 0, 1, 0, 0, 250); //Set the line dash style line1.Line.DashStyle = MsoLineDashStyle.Solid; //Set the placement. line1.Placement = PlacementType.FreeFloating; //Add another line to the worksheet. Aspose.Cells.Drawing.LineShape line2 = worksheet.Shapes.AddLine(7, 0, 1, 0, 85, 250); //Set the line dash style. line2.Line.DashStyle = MsoLineDashStyle.DashLongDash; //Set the weight of the line. line2.Line.Weight = 4; //Set the placement. line2.Placement = PlacementType.FreeFloating; //Add the third line to the worksheet. Aspose.Cells.Drawing.LineShape line3 = worksheet.Shapes.AddLine(13, 0, 1, 0, 0, 250); //Set the line dash style line3.Line.DashStyle = MsoLineDashStyle.Solid; //Set the placement. line3.Placement = PlacementType.FreeFloating; //Make the gridlines invisible in the first worksheet. workbook.Worksheets[0].IsGridlinesVisible = false; //Save the excel file. workbook.Save("tstlines.xls"); [VB.NET] 'Instantiate a new Workbook. Dim workbook As Workbook = New Workbook() 'Get the first worksheet in the book. Dim worksheet As Worksheet = workbook.Worksheets(0) 'Add a new line to the worksheet. Dim line1 As Aspose.Cells.Drawing.LineShape = worksheet.Shapes.AddLine(5, 0, 1, 0, 0, 250) 'Set the line dash style line1.Line.DashStyle = MsoLineDashStyle.Solid 'Set the placement. line1.Placement = PlacementType.FreeFloating 'Add another line to the worksheet. Dim line2 As Aspose.Cells.Drawing.LineShape = worksheet.Shapes.AddLine(7, 0, 1, 0, 85, 250) 'Set the line dash style. line2.Line.DashStyle = MsoLineDashStyle.DashLongDash 'Set the weight of the line. line2.Line.Weight = 4 'Set the placement. line2.Placement = PlacementType.FreeFloating 'Add the third line to the worksheet. Dim line3 As Aspose.Cells.Drawing.LineShape = worksheet.Shapes.AddLine(13, 0, 1, 0, 0, 250) 'Set the line dash style line3.Line.DashStyle = MsoLineDashStyle.Solid 'Set the placement. line3.Placement = PlacementType.FreeFloating 'Make the gridlines invisible in the first worksheet. workbook.Worksheets(0).IsGridlinesVisible = False 'Save the excel file. workbook.Save("tstlines.xls") Gets and sets the begin arrow head style of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadStyle property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the begin arrow head width of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadWidth property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the begin arrow head length of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadLength property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the end arrow head style of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadStyle property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the end arrow head width of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadWidth property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the end arrow head length of the line. NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadLength property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced. Encapsulates the object that represents the line format. [C#] Workbook workbook = new Workbook(); Worksheet sheet = workbook.Worksheets[0]; Cells cells = sheet.Cells; cells[0,1].PutValue("Income"); cells[1,0].PutValue("Company A"); cells[2,0].PutValue("Company B"); cells[3,0].PutValue("Company C"); cells[1,1].PutValue(10000); cells[2,1].PutValue(20000); cells[3,1].PutValue(30000); int chartIndex = sheet.Charts.Add(ChartType.Line, 9, 9, 21, 15); Chart chart = sheet.Charts[chartIndex]; //Add series chart.NSeries.Add("A2:B4", true); //Set category data chart.NSeries.CategoryData = "=Sheet1!$A$2:$A$4"; //Applying a dotted line style on the lines of an NSeries chart.NSeries[0].Border.Style = LineType.Dot; chart.NSeries[0].Border.Color = Color.Red; //Applying a triangular marker style on the data markers of an NSeries chart.NSeries[0].Marker.MarkerStyle = ChartMarkerType.Triangle; //Setting the weight of all lines in an NSeries to medium chart.NSeries[0].Border.Weight = WeightType.MediumLine; [Visual Basic] Dim workbook as Workbook = new Workbook() Dim sheet as Worksheet = workbook.Worksheets(0) Dim cells as Cells = sheet.Cells cells(0,1).PutValue("Income") cells(1,0).PutValue("Company A") cells(2,0).PutValue("Company B") cells(3,0).PutValue("Company C") cells(1,1).PutValue(10000) cells(2,1).PutValue(20000) cells(3,1).PutValue(30000) Dim chartIndex as Integer = sheet.Charts.Add(ChartType.Column, 9, 9, 21, 15) /// Dim chart as Chart = sheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A2" cell to "B4" chart.NSeries.Add("A2:B4", True) 'Setting the data source for the category data of NSeries Chart.NSeries.CategoryData = "A2:A4" 'Applying a dotted line style on the lines of an NSeries chart.NSeries(0).Border.Style = LineType.Dot chart.NSeries(0).Border.Color = Color.Red 'Applying a triangular marker style on the data markers of an NSeries chart.NSeries(0).Marker.MarkerStyle = ChartMarkerType.Triangle 'Setting the weight of all lines in an NSeries to medium chart.NSeries(0).Border.Weight = WeightType.MediumLine Specifies the compound line type Specifies the dash line type Specifies the ending caps. Specifies the joining caps. Specifies an arrowhead for the begin of a line. Specifies an arrowhead for the end of a line. Specifies the length of the arrowhead for the begin of a line. Specifies the length of the arrowhead for the end of a line. Specifies the width of the arrowhead for the begin of a line. Specifies the width of the arrowhead for the end of a line. Gets and sets the theme color. If the foreground color is not a theme color, NULL will be returned. Represents the of the line. Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear). Represents the style of the line. Gets or sets the of the line. Gets or sets the weight of the line in unit of points. Gets or sets the weight of the line in unit of pixels. Gets or sets format type. Indicates whether the color of line is automatic assigned. Represents whether the line is visible. Indicates whether this line style is auto assigned. Represents gradient fill. Represents the caps of a line Square protrudes by half line width. Rounded ends. Line ends at end point. None cap Represents all setting of the line. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); ShapeCollection shapes = workbook.Worksheets[0].Shapes; Shape shape = shapes.AddRectangle(1, 0, 1, 0, 50, 100); LineFormat lineFmt = shape.Line; //do your business Gets the hash code. [C#] int hashCode = lineFmt.GetHashCode(); Determines whether this instance has the same value as another specified object. The object to compare with this instance. true if the value of the obj parameter is the same as the value of this instance; otherwise, false. If obj is null, this method returns false. [C#] //You have to make sure that the index value in this line of code exists LineFormat obj = workbook.Worksheets[0].Shapes[0].Line; if (lineFmt.Equals(obj)) { //do what you want } Specifies the line compound type. [C#] lineFmt.CompoundType = MsoLineStyle.Single; Specifies the line dash type. [C#] lineFmt.DashStyle = MsoLineDashStyle.Solid; Specifies the ending caps. [C#] lineFmt.CapType = LineCapType.Flat; Specifies the line join type. [C#] lineFmt.JoinType = LineJoinType.Round; Gets and sets the begin arrow type of the line. [C#] lineFmt.BeginArrowheadStyle = MsoArrowheadStyle.ArrowOpen; Gets and sets the begin arrow width type of the line. [C#] lineFmt.BeginArrowheadWidth = MsoArrowheadWidth.Medium; Gets and sets the begin arrow length type of the line. [C#] lineFmt.BeginArrowheadLength = MsoArrowheadLength.Long; Gets and sets the end arrow type of the line. [C#] lineFmt.EndArrowheadStyle = MsoArrowheadStyle.ArrowOpen; Gets and sets the end arrow width type of the line. [C#] lineFmt.EndArrowheadWidth = MsoArrowheadWidth.Medium; Gets and sets the end arrow length type of the line. [C#] lineFmt.EndArrowheadLength = MsoArrowheadLength.Long; Gets or sets the weight of the line in unit of points. [C#] lineFmt.Weight = 2.0d; Represents the join styles of a line. Round joint Bevel joint Miter joint None joint Enumerates the type of border or line. Represents a dark gray line. Represent a dash line. Represents a dash-dot line Represents a dash-dot-dot line. Represents a dotted line. Represents a light gray line. Represents a medium gray line. Represent a solid line. Represents line and arrowhead formatting. Indicates whether the object is visible. Returns a Style object that represents the style of the specified range. Gets and sets the border line fore color. Gets and sets the border line back color. Gets or sets the dash style for the specified line. Returns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear). Returns or sets the weight of the line ,in units of pt. Enumerates the line end width of the shape border line. Short line end length Medium line end length Long line end length Enumerates the line end type of the shape border line. No line end type. Arrow line end type. Arrow Stealth line end type. Arrow Diamond Line end type. Arrow Oval line end type. Arrow Open line end type. Enumerates the line end width of the shape border line. Short line end width. Medium line end width. Wide line end width. Represents office drawing objects type. Group Line Rectangle Oval Arc Chart TextBox Button Picture Polygon CheckBox RadioButton Label DialogBox Spinner ScrollBar ListBox GroupBox ComboBox Comment OleObject Only for preserving the drawing object in the template file. Only for preserving the drawing object in the xlsx file. Slicer Web extension Smart Art Custom xml shape ,such as Ink. Timeline 3D Model Represents fill formatting for a shape. Gets and sets the fill fore color. Returns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear). Gets and sets the file back color. Gets and sets the Texture and Picture fill data. Sets the specified fill to a one-color gradient. One gradient color. The gradient degree. Can be a value from 0.0 (dark) through 1.0 (light). Gradient shading style. The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2. Gets the texture fill type. Indicates whether there is fill. Represents fill formatting for a shape. Gets and sets the fill fore color. Returns or sets the degree of fore color of the specified fill as a value from 0.0 (opaque) through 1.0 (clear). Gets and sets the file back color. Gets and sets the Texture and Picture fill data. Sets the specified fill to a one-color gradient. One gradient color. The gradient degree. Can be a value from 0.0 (dark) through 1.0 (light). Gradient shading style. The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2. Gets the texture fill type. Indicates whether there is fill. Represents the picture format. Represents the location of the top of the crop rectangle expressed, in unit of inches. Represents the location of the bottom of the crop rectangle expressed, in unit of inches. Represents the location of the left of the crop rectangle expressed, in unit of inches. Represents the location of the right of the crop rectangle expressed, in unit of inches. Represents the location of the top of the crop rectangle expressed, expressed as a ratio of the image's height. Represents the location of the bottom of the crop rectangle expressed, expressed as a ratio of the image's height. Represents the location of the left of the crop rectangle expressed, expressed as a ratio of the image's width. Represents the location of the right of the crop rectangle expressed, expressed as a ratio of the image's width. Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear). Gets and sets the transparent color of the picture. Represents the contrast modification for the picture.in unit of percentage. It is between -100% and 100%. It works same as Excel 2007 or above version. Represents the brightness modification for the picture in unit of percentage. It is between -100% and 100%. It works same as Excel 2007 or above version. Represents gamma of the picture. Indicates whether this picture should display in two-color black and white. Indicates whether this picture should display in grayscale. Gets the hash code. Represents style of dash drawing lines. Represent a dash line. Represents a dash-dot line. Represents a dash-dot-dot line. Represents a long dash-short dash line. Represents a long dash-short dash-dot line. Represents a round-dot line. Represent a solid line. Represents a square-dot line. Custom dash style. Represents line and arrowhead formatting. Indicates whether the object is visible. Returns a Style object that represents the style of the specified range. Gets and sets the border line fore color. Gets and sets the border line back color. Gets or sets the dash style for the specified line. Returns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear). Returns or sets the weight of the line ,in units of pt. Represents style of drawing lines. Single line (of width lineWidth) Three lines, thin, thick, thin Double lines, one thin, one thick Double lines, one thick, one thin Double lines of equal width Represents preset text effect type of WordArt. TextEffect1 TextEffect2 TextEffect3 TextEffect4 TextEffect5 TextEffect6 TextEffect7 TextEffect8 TextEffect9 TextEffect10 TextEffect11 TextEffect12 TextEffect13 TextEffect14 TextEffect15 TextEffect16 TextEffect17 TextEffect18 TextEffect19 TextEffect20 TextEffect21 TextEffect22 TextEffect23 TextEffect24 TextEffect25 TextEffect26 TextEffect27 TextEffect28 TextEffect29 TextEffect30 Represents preset text effect shape type of WordArt. PlainText Stop TriangleUp TriangleDown ChevronUp ChevronDown RingInside RingOutside ArchUpCurve ArchDownCurve CircleCurve ButtonCurve ArchUpPour ArchDownPour CirclePour ButtonPour CurveUp CurveDown CanUp CanDown Wave1 Wave2 DoubleWave1 DoubleWave2 Inflate Deflate InflateBottom DeflateBottom InflateTop DeflateTop DeflateInflate DeflateInflateDeflate FadeRight FadeLeft FadeUp FadeDown SlantUp SlantDown CascadeUp CascadeDown Mixed Represents the text frame in a Shape object. Indicates if size of shape is adjusted automatically according to its content. Indicates whether the margin is auto calculated. Indicates whether rotating text with shape. Returns the left margin in unit of Points Returns the right margin in unit of Points Returns the top margin in unit of Points Returns the bottom margin in unit of Points Represents an OleObject in a worksheet. [C#] //Instantiate a new Workbook. Workbook workbook = new Workbook(); //Get the first worksheet. Worksheet sheet = workbook.Worksheets[0]; //Define a string variable to store the image path. string ImageUrl = "school.jpg"; //Get the picture into the streams. FileStream fs = new FileStream(ImageUrl, FileMode.Open); //Define a byte array. byte[] imageData = new Byte[fs.Length]; //Obtain the picture into the array of bytes from streams. fs.Read(imageData, 0, imageData.Length); //Close the stream. fs.Close(); //Get an excel file path in a variable. string path = "Book1.xls"; //Get the file into the streams. fs = new FileStream(path, FileMode.Open); //Define an array of bytes. byte[] objectData = new Byte[fs.Length]; //Store the file from streams. fs.Read(objectData, 0, objectData.Length); //Close the stream. fs.Close(); //Add an Ole object into the worksheet with the image //shown in MS Excel. sheet.OleObjects.Add(14, 3, 200, 220, imageData); //Set embedded ole object data. sheet.OleObjects[0].ObjectData = objectData; //Save the excel file workbook.Save(@"oleobjects.xls"); [Visual Basic] 'Instantiate a new Workbook. Dim workbook As Workbook = New Workbook() 'Get the first worksheet. Dim sheet As Worksheet = workbook.Worksheets(0) 'Define a string variable to store the image path. Dim ImageUrl As String = @"school.jpg" 'Get the picture into the streams. Dim fs As FileStream = File.OpenRead(ImageUrl) 'Define a byte array. Dim imageData(fs.Length) As Byte 'Obtain the picture into the array of bytes from streams. fs.Read(imageData, 0, imageData.Length) 'Close the stream. fs.Close() 'Get an excel file path in a variable. Dim path As String = @"Book1.xls" 'Get the file into the streams. fs = File.OpenRead(path) 'Define an array of bytes. Dim objectData(fs.Length) As Byte 'Store the file from streams. fs.Read(objectData, 0, objectData.Length) 'Close the stream. fs.Close() 'Add an Ole object into the worksheet with the image 'shown in MS Excel. sheet.OleObjects.Add(14, 3, 200, 220, imageData) 'Set embedded ole object data. sheet.OleObjects(0).ObjectData = objectData 'Save the excel file workbook.Save("oleobjects.xls") Sets embedded object data. Indicates whether the object links to the file. If true, the parameter objectData is ignored. The embedded object data. The file name. Indicates whether diplaying object as an icon. If true, the orginal image data will be covered by icon. The icon label. Only works when displayAsIcon as true. Sets embedded object data. Indicates whether the object links to the file. If true, the parameter objectData is ignored. The embedded object data. The file name. Indicates whether diplaying object as an icon. If true, the orginal image data will be covered by icon. The icon label. Only works when displayAsIcon as true. Indicates whether automatically updating icon. As Aspose can update embedd all file icons, so it's better that you can add correct icon with as false. True indicates that the size of the ole object will be auto changed as the size of snapshot of the embedded content when the ole object is activated. Returns true if the OleObject links to the file. True if the specified object is displayed as an icon and the image will not be auto changed. Represents image of ole object as byte array. Represents embedded ole object data as byte array. Gets the full embedded ole object binary data in the template file. Gets or sets the path and name of the source file for the linked image. The default value is an empty string. If SourceFullName is not an empty string, the image is linked. If SourceFullName is not an empty string, but Data is null, then the image is linked and not stored in the file. Sets the ole native source full file name with path. the ole native source full file name Gets or sets the ProgID of the OLE object. Gets and sets the file type of the embedded ole object data Returns the source full name of the source file for the linked OLE object. Only supports setting the source full name when the file type is OleFileType.Unknown. Such as wav file ,avi file..etc.. Gets and sets the display label of the linked ole object. Returns the source full name of the source file for the linked OLE object. NOTE: This member is now obsolete. Instead, please use OleObject.ObjectSourceFullName property. This property will be removed 12 months later since November 2013. Aspose apologizes for any inconvenience you may have experienced. Specifies whether the link to the OleObject is automatically updated or not. Specifies whether the host application for the embedded object shall be called to load the object data automatically when the parent workbook is opened. Gets and sets the class identifier of the embedded object. It means which application opens the embedded file. Gets the image format of the ole object. Represents embedded OLE objects. Adds an OleObject to the collection. Upper left row index. Upper left column index. Height of oleObject, in unit of pixel. Width of oleObject, in unit of pixel. Image of ole object as byte array. object index. Adds a linked OleObject to the collection. Upper left row index. Upper left column index. Height of oleObject, in unit of pixel. Width of oleObject, in unit of pixel. Image of ole object as byte array. object index. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Remove all embedded OLE objects. Removes the element at the specified index. The specified index. Represents the oval shape. //Instantiating a Workbook object Workbook workbook = new Workbook(); //get ShapeCollection ShapeCollection shapes = workbook.Worksheets[0].Shapes; //add a oval Oval oval = shapes.AddOval(1, 0, 1, 0, 50, 50); //do your business //Save the excel file. workbook.Save("result.xlsx"); Encapsulates the object that represents a single picture in a spreadsheet. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Workbook object int sheetIndex = workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[sheetIndex]; //Adding a picture at the location of a cell whose row and column indices //are 5 in the worksheet. It is "F6" cell worksheet.Pictures.Add(5, 5, "image.gif"); //Saving the Excel file workbook.Save("book1.xls", SaveFormat.Excel97To2003); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Workbook object Dim sheetIndex As Integer = workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex) 'Adding a picture at the location of a cell whose row and column indices 'are 5 in the worksheet. It is "F6" cell worksheet.Pictures.Add(5, 5, "image.gif") 'Saving the Excel file workbook.Save("book1.xls", SaveFormat.Excel97To2003) Copy the picture. The source picture. The copy options. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //insert first picture int imgIndex1 = worksheet.Pictures.Add(1, 1, "1.png"); //Get the inserted picture object Picture pic1 = worksheet.Pictures[imgIndex1]; //insert second picture int imgIndex2 = worksheet.Pictures.Add(1, 9, "2.jpeg"); //Get the inserted picture object Picture pic2 = worksheet.Pictures[imgIndex2]; //Copy picture 1 to picture 2.You'll get two picture 1 objects that are superimposed on top of each other. CopyOptions opt = new CopyOptions(); pic2.Copy(pic1, opt); //Save the excel file. workbook.Save("result.xlsx"); Moves the picture to a specified location. Upper left row index. Upper left column index. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Adding a picture at the location of a cell whose row and column indices are 1 in the worksheet. It is "B2" cell int imgIndex = worksheet.Pictures.Add(1, 1, "example.jpeg"); //Get the inserted picture object Picture pic = worksheet.Pictures[imgIndex]; //Set the new location of the picture pic.Move(2, 4); //Save the excel file. workbook.Save("result.xlsx"); Place this picture in the cell Gets the original height of the picture. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Adding a picture at the location of a cell whose row and column indices are 1 in the worksheet. It is "B2" cell int imgIndex = worksheet.Pictures.Add(1, 1, "example.jpeg"); //Get the inserted picture object Picture pic = worksheet.Pictures[imgIndex]; //Gets the original height of the picture. int picHeight = pic.OriginalHeight; //Save the excel file. workbook.Save("result.xlsx"); Gets the original width of the picture. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Adding a picture at the location of a cell whose row and column indices are 1 in the worksheet. It is "B2" cell int imgIndex = worksheet.Pictures.Add(1, 1, "example.jpeg"); //Get the inserted picture object Picture pic = worksheet.Pictures[imgIndex]; //Gets the original width of the picture. int picWidth = pic.OriginalWidth; //Save the excel file. workbook.Save("result.xlsx"); Represents the of the border line of a picture. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Adding a picture at the location of a cell whose row and column indices are 1 in the worksheet. It is "B2" cell int imgIndex = worksheet.Pictures.Add(1, 1, "example.jpeg"); //Get the inserted picture object Picture pic = worksheet.Pictures[imgIndex]; //Set the border color of the picture pic.BorderLineColor = Color.Red; //Save the excel file. workbook.Save("result.xlsx"); Gets or sets the weight of the border line of a picture in units of pt. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Adding a picture at the location of a cell whose row and column indices are 1 in the worksheet. It is "B2" cell int imgIndex = worksheet.Pictures.Add(1, 1, "example.jpeg"); //Get the inserted picture object Picture pic = worksheet.Pictures[imgIndex]; //Set the border color of the picture pic.BorderLineColor = Color.Red; //Set the border width of the picture pic.BorderWeight = 3; //Save the excel file. workbook.Save("result.xlsx"); Gets the data of the picture. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //insert first picture int imgIndex1 = worksheet.Pictures.Add(1, 1, "example1.png"); //Get the inserted picture object Picture pic1 = worksheet.Pictures[imgIndex1]; //insert second picture int imgIndex2 = worksheet.Pictures.Add(1, 9, "example2.jpeg"); //Get the inserted picture object Picture pic2 = worksheet.Pictures[imgIndex2]; //Assign the byte data of the first image to the second image pic2.Data = pic1.Data; //Save the excel file. workbook.Save("result.xlsx"); Gets or sets the path and name of the source file for the linked image. The default value is an empty string. If SourceFullName is not an empty string, the image is linked. If SourceFullName is not an empty string, but Data is null, then the image is linked and not stored in the file. Gets and sets the data of the formula. True indicates that the size of the ole object will be auto changed as the size of snapshot of the embedded content when the ole object is activated. Returns true if the picture is linked to a file. Gets or sets whether dynamic data exchange True if the specified object is displayed as an icon and the image will not be auto changed. Gets the image format of the picture. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //insert first picture int imgIndex1 = worksheet.Pictures.Add(1, 1, "1.png"); //Get the inserted picture object Picture pic1 = worksheet.Pictures[imgIndex1]; if(pic1.ImageType == Aspose.Cells.Drawing.ImageType.Png) { //The picture's type is png."; } //insert second picture int imgIndex2 = worksheet.Pictures.Add(1, 9, "2.jpeg"); //Get the inserted picture object Picture pic2 = worksheet.Pictures[imgIndex2]; if(pic2.ImageType == Aspose.Cells.Drawing.ImageType.Jpeg) { //The picture's type is jpg."; } Gets the original height of picture, in unit of centimeters. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Adding a picture at the location of a cell whose row and column indices are 1 in the worksheet. It is "B2" cell int imgIndex = worksheet.Pictures.Add(1, 1, "example.jpeg"); //Get the inserted picture object Picture pic = worksheet.Pictures[imgIndex]; //Gets the original height of the picture. double picHeightCM = pic.OriginalHeightCM; //Save the excel file. workbook.Save("result.xlsx"); Gets the original width of picture, in unit of centimeters. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Adding a picture at the location of a cell whose row and column indices are 1 in the worksheet. It is "B2" cell int imgIndex = worksheet.Pictures.Add(1, 1, "example.jpeg"); //Get the inserted picture object Picture pic = worksheet.Pictures[imgIndex]; //Gets the original width of the picture. double picWidthCM = pic.OriginalWidthCM; //Save the excel file. workbook.Save("result.xlsx"); Gets the original height of picture, in unit of inches. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Adding a picture at the location of a cell whose row and column indices are 1 in the worksheet. It is "B2" cell int imgIndex = worksheet.Pictures.Add(1, 1, "example.jpeg"); //Get the inserted picture object Picture pic = worksheet.Pictures[imgIndex]; //Gets the original height of the picture. double picHeightInch = pic.OriginalHeightInch; //Save the excel file. workbook.Save("result.xlsx"); Gets the original width of picture, in unit of inches. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Adding a picture at the location of a cell whose row and column indices are 1 in the worksheet. It is "B2" cell int imgIndex = worksheet.Pictures.Add(1, 1, "example.jpeg"); //Get the inserted picture object Picture pic = worksheet.Pictures[imgIndex]; //Gets the original width of the picture. double picWidthInch = pic.OriginalWidthInch; //Save the excel file. workbook.Save("result.xlsx"); Gets and sets the signature line [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Adding a picture at the location of a cell whose row and column indices are 1 in the worksheet. It is "B2" cell int imgIndex = worksheet.Pictures.Add(1, 1, (string)null); //Get the inserted picture object Picture pic = worksheet.Pictures[imgIndex]; // Create signature line object SignatureLine s = new SignatureLine(); s.Signer = "Simon"; s.Title = "Development"; s.Email = "simon@aspose.com"; // Assign the signature line object to Picture. pic.SignatureLine = s; //Save the excel file. workbook.Save("result.xlsx"); Returns whether the shape is same. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //insert first picture int imgIndex1 = worksheet.Pictures.Add(1, 1, "1.png"); //Get the inserted picture object Picture pic1 = worksheet.Pictures[imgIndex1]; //insert second picture int imgIndex2 = worksheet.Pictures.Add(1, 9, "2.jpeg"); //Get the inserted picture object Picture pic2 = worksheet.Pictures[imgIndex2]; if(pic1.IsSameSetting(pic1)) { //two image objects are the same. } if(!pic1.IsSameSetting(pic2)) { //two image objects are not the same. } Encapsulates a collection of objects. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //get PictureCollection PictureCollection pictures = workbook.Worksheets[0].Pictures; //do your business //Save the excel file. workbook.Save("result.xlsx"); Adds a picture to the collection. Upper left row index. Upper left column index. Lower right row index Lower right column index Stream object which contains the image data. object index. [C#] //add a picture using (FileStream fs = new FileStream("image.jpg", FileMode.Open)) { pictures.Add(1, 1, 5, 5, fs); } Adds a picture to the collection. Upper left row index. Upper left column index. Lower right row index Lower right column index Image filename. object index. /// [C#] //add a picture pictures.Add(1, 1, 5, 5, "image.jpg"); Adds a picture to the collection. Upper left row index. Upper left column index. Stream object which contains the image data. object index. [C#] //add a picture using (FileStream fs = new FileStream("image.jpg", FileMode.Open)) { pictures.Add(1, 1, fs); } Adds a picture to the collection. Upper left row index. Upper left column index. Image filename. object index. [C#] //add a picture pictures.Add(1, 1, "image.jpg"); Adds a picture to the collection. Upper left row index. Upper left column index. Stream object which contains the image data. Scale of image width, a percentage. Scale of image height, a percentage. object index. [C#] //add a picture using (FileStream fs = new FileStream("image.jpg", FileMode.Open)) { pictures.Add(1, 1, fs, 50, 50); } Adds a picture to the collection. Upper left row index. Upper left column index. Image filename. Scale of image width, a percentage. Scale of image height, a percentage. object index. [C#] //add a picture pictures.Add(1, 1, "image.jpg", 50, 50); Gets the element at the specified index. The zero based index of the element. The element at the specified index. [C#] //get picture collection //PictureCollection pictures = workbook.Worksheets[0].Pictures; //add a picture int index = pictures.Add(1, 1, "image.png"); //get the picture Picture pic = pictures[index]; Clear all pictures. [C#] //clear pictures.Clear(); Remove shapes at the specific index [C#] //add a picture int index2 = pictures.Add(1, 1, "image.png"); //delete pictures.RemoveAt(index2); Represents the way the drawing object is attached to the cells below it. Don't move or size with cells. Move but don't size with cells. Move and size with cells. Represents the rectangle shape. //Instantiating a Workbook object Workbook workbook = new Workbook(); //get ShapeCollection ShapeCollection shapes = workbook.Worksheets[0].Shapes; //add a rectangle RectangleShape rectangle = shapes.AddRectangle(2, 0, 2, 0, 130, 130); //do your business //Save the excel file. workbook.Save("result.xlsx"); Represents the msodrawing object. [C#] //Initialize a new workbook. Workbook book = new Workbook(); //Add a shape.(e.g rectangle) Aspose.Cells.Drawing.Shape shape = book.Worksheets[0].Shapes.AddRectangle(2, 0, 2, 0, 130, 130); //do your business //Save the excel file. book.Save("exmaple.xlsx"); Gets and sets the name of macro. [C#] //Sets the name of macro. shape.MacroName = "DoWork()"; Indicates whether the shape only contains an equation. [C#] //If true,the shape only contains an equation. if(shape.IsEquation) { //The shape contains only an equation } Indicates whether the shape is a smart art. Only for ooxml file. [C#] //if true,the shape is a smart art. if(shape.IsSmartArt) { //The shape is SmartArt object. } Converting smart art to grouped shapes. [C#] if(shape.IsSmartArt) { Aspose.Cells.Drawing.GroupShape groupShape = shape.GetResultOfSmartArt(); } Brings the shape to the front or sends the shape to back. If it's less than zero, sets the shape to back. If it's greater than zero, brings the shape to front. [C#] shape.ToFrontOrBack(2); //or shape.ToFrontOrBack(-1); Returns the position of a shape in the z-order. [C#] shape.ZOrderPosition = 3; Gets and sets the name of the shape. [C#] shape.Name = "shape1"; Returns or sets the descriptive (alternative) text string of the object. [C#] shape.AlternativeText = "a rectangle"; Specifies the title (caption) of the current shape object. [C#] shape.Title = "title1"; Returns a MsoLineFormat object that contains line formatting properties for the specified shape. NOTE: This member is now obsolete. Instead, please use Shape.Line property. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced. Returns a MsoFillFormat object that contains fill formatting properties for the specified shape. NOTE: This member is now obsolete. Instead, please use Shape.Fill property. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced. Gets line style [C#] Aspose.Cells.Drawing.LineFormat lineFmt = shape.Line; Returns a object that contains fill formatting properties for the specified shape. [C#] Aspose.Cells.Drawing.FillFormat fillFmt = shape.Fill; Represents a object that specifies shadow effect for the chart element or shape. [C#] Aspose.Cells.Drawing.ShadowEffect shadowEffect = shape.ShadowEffect; Represents a object that specifies reflection effect for the chart element or shape. [C#] Aspose.Cells.Drawing.ReflectionEffect reflectionEffect = shape.Reflection; Represents a object that specifies glow effect for the chart element or shape. [C#] Aspose.Cells.Drawing.GlowEffect glowEffect = shape.Glow; Gets and sets the radius of blur to apply to the edges, in unit of points. [C#] shape.SoftEdges = 0.5d; Gets and sets 3d format of the shape. [C#] Aspose.Cells.Drawing.ThreeDFormat threeDFormat = shape.ThreeDFormat; Gets and sets the options of the picture format. [C#] Aspose.Cells.Drawing.MsoFormatPicture msoFormatPicture = shape.FormatPicture; Indicates whether the object is visible. [C#] shape.IsHidden = false; True means that aspect ratio of the shape is locked. Only for pictures and Ole Objects. NOTE: This member is now obsolete. Instead, please use Shape.IsAspectRatioLocked property. This property will be removed 12 months later since July 2024. Aspose apologizes for any inconvenience you may have experienced. [C#] shape.IsLockAspectRatio = false; True means that aspect ratio of the shape is locked. Only for pictures and Ole Objects. [C#] shape.IsAspectRatioLocked = false; Gets the value of locked property. The type of the shape locked property. Returns the value of locked property. [C#] int noAdjustHandles = 0; if (shape.GetLockedProperty(ShapeLockType.AdjustHandles)) noAdjustHandles = 1; Set the locked property. The locked type. The value of the property. [C#] shape.SetLockedProperty(ShapeLockType.AdjustHandles, true); Gets and sets the rotation of the shape. [C#] //Gets rotation angle of the shape. double angle = shape.RotationAngle ; //Gets rotation angle of the shape. shape.RotationAngle = 60; Adds a hyperlink to the shape. Address of the hyperlink. Return the new hyperlink object. [C#] Aspose.Cells.Hyperlink hyperlink = shape.AddHyperlink("https://www.aspose.com/"); Removes the hyperlink of the shape. [C#] shape.RemoveHyperlink(); Gets the hyperlink of the shape. [C#] Aspose.Cells.Hyperlink hyperlink = shape.Hyperlink; Moves the shape to a specified range. Upper left row index. Upper left column index. Lower right row index Lower right column index [C#] shape.MoveToRange(12, 3, 13, 5); Moves the picture to the top-right corner. the row index. the column index. [C#] shape.AlignTopRightCorner(2, 5); Gets the identifier of this shape. [C#] int id = shape.Id; Specifies an optional string identifier that an application can use to identify the particular shape. [C#] string spid = shape.Spid; Specifies an optional number that an application can use to associate the particular shape with a defined shape type. [C#] int spt = shape.Spt; Gets the object which contains this shape. [C#] Aspose.Cells.Worksheet worksheet = shape.Worksheet; Indicates whether this shape is a group shape. [C#] if(shape.IsGroup) { //This shape is a group. } Indicates whether the shape is grouped. Indicates whether this shape is a word art. Only for the Legacy Shape of xls file. [C#] if(shape.IsWordArt) { //This shape is a WordArt object. } Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Applies to Shape objects that represent WordArt. [C#] if(shape.IsWordArt) { Aspose.Cells.Drawing.TextEffectFormat textEffectFormat = shape.TextEffect; } True means the object can not be modified when the sheet is protected. Note that this value is meaningful only if the worksheet or objects in the worksheet are protected. [C#] //Sets the specified shape to unlocked state if (shape.Worksheet.IsProtected && shape.IsLocked) { shape.IsLocked = false; } //Sets the specified shape to a locked state if (shape.Worksheet.IsProtected && !shape.IsLocked) { shape.IsLocked = true; } Indicates whether the object is printable. If False, this shape will not be printed when printing. [C#] if(shape.IsPrintable) shape.IsPrintable = false; Gets drawing type. [C#] Aspose.Cells.Drawing.MsoDrawingType msoDrawingType = shape.MsoDrawingType; Gets and sets the auto shape type. [C#] if (shape.AutoShapeType == Aspose.Cells.Drawing.AutoShapeType.Unknown) shape.AutoShapeType = Aspose.Cells.Drawing.AutoShapeType.Rectangle; Gets and set the type of the shape anchor placeholder. [C#] if (shape.AnchorType == ShapeAnchorType.OneCellAnchor) shape.AnchorType = ShapeAnchorType.TwoCellAnchor; Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet. [C#] if (shape.Placement == PlacementType.Move) shape.Placement = PlacementType.MoveAndSize; Represents the top row index. If the shape is in the shape or in the group , UpperLeftRow will be ignored. [C#] if (shape.UpperLeftRow == 3) shape.UpperLeftRow = 1; Gets or sets the shape's vertical offset from its upper left corner row. The range of value is 0 to 256. [C#] if (shape.UpperDeltaY == 3) shape.UpperDeltaY = 1; Represents upper left corner column index. [C#] if (shape.UpperLeftColumn == 3) shape.UpperLeftColumn = 1; Gets or sets the shape's horizontal offset from its upper left corner column. The range of value is 0 to 1024. [C#] if (shape.UpperDeltaX == 3) shape.UpperDeltaX = 1; Represents lower right corner row index. [C#] if (shape.LowerRightRow == 3) shape.LowerRightRow = 1; Gets or sets the shape's vertical offset from its lower right corner row. The range of value is 0 to 256. [C#] if (shape.LowerDeltaY == 3) shape.LowerDeltaY = 1; Represents lower right corner column index. [C#] if (shape.LowerRightColumn == 3) shape.LowerRightColumn = 1; Gets or sets the shape's horizontal offset from its lower right corner column. The range of value is 0 to 1024. [C#] if (shape.LowerDeltaX == 3) shape.LowerDeltaX = 1; Represents the width of the shape's horizontal offset from its lower right corner column, in unit of pixels. [C#] if (shape.Right == 3) shape.Right = 1; Represents the width of the shape's vertical offset from its lower bottom corner row, in unit of pixels. [C#] if (shape.Bottom == 3) shape.Bottom = 1; Represents the width of shape, in unit of pixels. [C#] if (shape.Width == 3) shape.Width = 1; Represents the width of the shape, in unit of inch. [C#] if (shape.WidthInch == 3) shape.WidthInch = 1; Represents the width of the shape, in unit of point. [C#] if (shape.WidthPt == 3) shape.WidthPt = 1; Represents the width of the shape, in unit of centimeters. [C#] if (shape.WidthCM == 3) shape.WidthCM = 1; Represents the height of shape, in unit of pixel. [C#] if (shape.Height == 3) shape.Height = 1; Represents the height of the shape, in unit of inches. [C#] if (shape.HeightInch == 3) shape.HeightInch = 1; Represents the height of the shape, in unit of points. [C#] if (shape.HeightPt == 3) shape.HeightPt = 1; Represents the height of the shape, in unit of centimeters. [C#] if (shape.HeightCM == 3) shape.HeightCM = 1; Represents the horizontal offset of shape from its left column, in unit of pixels. [C#] if (shape.Left == 3) shape.Left = 1; Represents the horizontal offset of shape from its left column, in unit of inches. [C#] if (shape.LeftInch == 3) shape.LeftInch = 1; Represents the horizontal offset of shape from its left column, in unit of centimeters. [C#] if (shape.LeftCM == 3) shape.LeftCM = 1; Represents the vertical offset of shape from its top row, in unit of pixels. If the shape is in the chart, represents the vertical offset of shape from its top border. [C#] if (shape.Top == 3) shape.Top = 1; Represents the vertical offset of shape from its top row, in unit of inches. [C#] if (shape.TopInch == 3) shape.TopInch = 1; Represents the vertical offset of shape from its top row, in unit of centimeters. [C#] if (shape.TopCM == 3) shape.TopCM = 1; Gets and sets the vertical offset of shape from worksheet top border, in unit of pixels. [C#] if (shape.TopToCorner == 3) shape.TopToCorner = 1; Gets and sets the horizonal offset of shape from worksheet left border. [C#] if (shape.LeftToCorner == 3) shape.LeftToCorner = 1; Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels. [C#] if (shape.X == 3) shape.X = 1; Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels. [C#] if (shape.Y == 3) shape.Y = 1; Gets and sets the width scale, in unit of percent of the original picture width. If the shape is not picture ,the WidthScale property only returns 100; [C#] if (shape.WidthScale == 3) shape.WidthScale = 1; Gets and sets the height scale,in unit of percent of the original picture height. If the shape is not picture ,the HeightScale property only returns 100; [C#] if (shape.HeightScale == 3) shape.HeightScale = 1; Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape. Only Applies when this shape in the group or chart. [C#] if (shape.IsInGroup && shape.TopInShape == 8000) shape.TopInShape = 4000; Represents the horizontal offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape. Only Applies when this shape in the group or chart. [C#] if (shape.IsInGroup && shape.LeftInShape == 2000) shape.LeftInShape = 4000; Represents the width of the shape, in unit of 1/4000 of the parent shape. Only Applies when this shape in the group or chart. [C#] if (shape.IsInGroup && shape.WidthInShape == 2000) shape.WidthInShape = 4000; Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.. Only Applies when this shape in the group or chart. [C#] if (shape.IsInGroup && shape.HeightInShape == 4000) shape.HeightInShape = 2000; Gets the group shape which contains this shape. [C#] Aspose.Cells.Drawing.GroupShape groupShape = shape.Group; Gets the auto shape type. [C#] Aspose.Cells.Drawing.AutoShapeType autoShapeType = shape.Type; Gets and sets the line border of the shape is visible. [C#] if(shape.HasLine == false) shape.HasLine = true; Indicates whether the fill format is visible. [C#] if(shape.IsFilled == false) shape.IsFilled = true; Gets and sets whether shape is horizontally flipped . [C#] if(shape.IsFlippedHorizontally == false) shape.IsFlippedHorizontally = true; Gets and sets whether shape is vertically flipped . [C#] if(shape.IsFlippedVertically == false) shape.IsFlippedVertically = true; Get the actual bottom row. [C#] int rRow = shape.ActualLowerRightRow; Get the connection points [X,Y] pairs of the connection point. Every item is a float[2] array, [0] represents x and [1] represents y. [C#] float[][] points = shape.GetConnectionPoints(); Creates the shape image and saves it to a stream in the specified format. The output stream. The type in which to save the image.

The following formats are supported: .bmp, .gif, .jpg, .jpeg, .tiff, .emf.

[C#] MemoryStream imageStream = new MemoryStream(); shape.ToImage(imageStream, ImageType.Png);
Saves the shape to a file. [C#] ImageOrPrintOptions op = new ImageOrPrintOptions(); shape.ToImage("exmaple.png", op); Saves the shape to a stream. [C#] MemoryStream imageStream = new MemoryStream(); ImageOrPrintOptions op = new ImageOrPrintOptions(); shape.ToImage(imageStream, op); Indicates whether shape is relative to original picture size. [C#] if(shape.RelativeToOriginalPictureSize) shape.RelativeToOriginalPictureSize = false; Gets or sets the worksheet range linked to the control's value. [C#] if (shape.LinkedCell.Equals("$B$6")) shape.LinkedCell = "A1"; Gets or sets the worksheet range used to fill the specified combo box. [C#] if (shape.InputRange.Equals("$B$6:$B10")) shape.InputRange = "$A$1:$A$5"; Gets the range linked to the control's value. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The range linked to the control's value. [C#] //You may get results like '$A$1' string link = shape.GetLinkedCell(false, false); Sets the range linked to the control's value. The range linked to the control's value. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. [C#] //After executing the code below, a ScrollBar object is created in the generated file. As you drag the slider, the value is displayed in cell A12. //ActiveX Controls //Aspose.Cells.Drawing.Shape scrollBar = book.Worksheets[0].Shapes.AddActiveXControl( Aspose.Cells.Drawing.ActiveXControls.ControlType.ScrollBar,2, 0, 2, 0, 30, 130); //Form Controls Aspose.Cells.Drawing.Shape scrollBar = book.Worksheets[0].Shapes.AddScrollBar(2, 0, 2, 0, 130, 30); //Sets the range linked to the control's value. scrollBar.SetLinkedCell("$A$12", false, true); Gets the range used to fill the control. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The range used to fill the control. [C#] string range = shape.GetInputRange(false, true); //If successful, a value like "$A$1:$A$3" will be returned Sets the range used to fill the control. The range used to fill the control. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. [C#] //After executing the code below, a ListBox object is created in the generated file. When the selected option is clicked, the selected value is displayed in cell A12. for (int i = 0; i< 10; ++i) { Cell cell = book.Worksheets[0].Cells[i, 0]; cell.Value = i + 1; } //Create a ListBox object //ActiveX Controls //Aspose.Cells.Drawing.Shape listBox = book.Worksheets[0].Shapes.AddActiveXControl( Aspose.Cells.Drawing.ActiveXControls.ControlType.ListBox,2, 0, 2, 0, 130, 130); //Form Controls Aspose.Cells.Drawing.Shape listBox = book.Worksheets[0].Shapes.AddListBox(2, 0, 2, 0, 130, 130); //Sets the range used to fill the control. listBox.SetInputRange("$A$1:$A$6", false, false); //Sets the range linked to the control's value. listBox.SetLinkedCell("$A$12", false, true); Update the selected value by the value of the linked cell. [C#] Cell cell = null; for (int i = 0; i< 10; ++i) { cell = book.Worksheets[0].Cells[i, 0]; cell.Value = i + 1; } //Create a ListBox object //ActiveX Controls //Aspose.Cells.Drawing.Shape listBox = book.Worksheets[0].Shapes.AddActiveXControl( Aspose.Cells.Drawing.ActiveXControls.ControlType.ListBox,2, 0, 2, 0, 130, 130); //Form Controls Aspose.Cells.Drawing.Shape listBox = book.Worksheets[0].Shapes.AddListBox(2, 0, 2, 0, 130, 130); //Sets the range used to fill the control. listBox.SetInputRange("$A$1:$A$6", false, false); //Sets the range linked to the control's value. listBox.SetLinkedCell("$A$12", false, true); ListBox listbx = (ListBox)listBox; //Set the value of cell A12 cell = book.Worksheets[0].Cells[11, 0]; cell.Value = 3; //Update the selected value by the value of the linked cell. listBox.UpdateSelectedValue(); //-1 default, no option selected if(listbx.IsSelected(2)) { //Option 3 of the ListBox is selected } //Change the value of a linked cell cell.Value = 4; //Update the selected value by the value of the linked cell. listBox.UpdateSelectedValue(); if(listbx.IsSelected(3)) { //Option 4 of the ListBox is selected } Gets and sets the preset text shape type. [C#] if (shape.TextShapeType == Aspose.Cells.Drawing.AutoShapeType.Unknown) shape.TextShapeType = Aspose.Cells.Drawing.AutoShapeType.Rectangle; Gets and sets the setting of the shape's text. [C#] Aspose.Cells.Drawing.Texts.FontSettingCollection fontSettingCollection = shape.TextBody; fontSettingCollection.Text = "This is a test."; Represents the font of shape. [C#] Aspose.Cells.Font font = shape.Font; font.Name = "Arial"; font.Size = 12; font.Color = Color.Red; Represents the text options of the shape. [C#] Aspose.Cells.Drawing.Texts.TextOptions opt = shape.TextOptions; opt.Color = Color.Blue; opt.Size = 8; Recalculate the text area Text's Size in an array(width and height). [C#] //The size of the text area is:w=size[0],h=size[1] int[] size = shape.CalculateTextSize(); Gets and sets the text of this shape. [C#] if(shape.Text == null) shape.Text = "This is a test."; Whether or not the text is rich text. [C#] if(shape.IsRichText) Console.WriteLine("The text is rich text."); Gets and sets the html string which contains data and some formats in this textbox. [C#] string html = shape.HtmlText; if(html == null || html == "") { shape.HtmlText = "<Font Style='FONT-FAMILY: Calibri;FONT-SIZE: 11pt;COLOR: #0000ff;TEXT-ALIGN: left;'>This is a <b>test</b>.</Font>"; } Formats some characters with the font setting. The start index. The length. The font setting. The flag of the font setting. Returns a Characters object that represents a range of characters within the text. The index of the start of the character. The number of characters. Characters object. This method only works on shape with title. [C#] Aspose.Cells.FontSetting fontSetting = shape.Characters(0, 4); Returns all Characters objects that represents a range of characters within the text . All Characters objects [C#] ArrayList list = shape.GetCharacters(); NOTE: This method is now obsolete. Instead, please use Shape.GetRichFormattings() method. This method will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced. Returns all Characters objects that represents a range of characters within the text . All Characters objects [C#] FontSetting[] list = shape.GetRichFormattings(); Gets and sets the text vertical overflow type of the shape which contains text. [C#] if (shape.TextVerticalOverflow == Aspose.Cells.Drawing.TextOverflowType.Clip) shape.TextVerticalOverflow = Aspose.Cells.Drawing.TextOverflowType.Overflow; Gets and sets the text horizontal overflow type of the shape which contains text. [C#] if (shape.TextHorizontalOverflow == Aspose.Cells.Drawing.TextOverflowType.Clip) shape.TextHorizontalOverflow = Aspose.Cells.Drawing.TextOverflowType.Overflow; Gets and sets the text wrapped type of the shape which contains text. [C#] if (shape.IsTextWrapped) shape.IsTextWrapped = !shape.IsTextWrapped; Gets and sets the text orientation type of the shape. [C#] if (shape.TextOrientationType == Aspose.Cells.TextOrientationType.NoRotation) shape.TextOrientationType = Aspose.Cells.TextOrientationType.TopToBottom; Gets and sets the text horizontal alignment type of the shape. [C#] if (shape.TextHorizontalAlignment == Aspose.Cells.TextAlignmentType.Bottom) shape.TextHorizontalAlignment = Aspose.Cells.TextAlignmentType.Center; Gets and sets the text vertical alignment type of the shape. [C#] if (shape.TextVerticalAlignment == Aspose.Cells.TextAlignmentType.Bottom) shape.TextVerticalAlignment = Aspose.Cells.TextAlignmentType.Center; Gets/Sets the direction of the text flow for this object. [C#] if (shape.TextDirection == Aspose.Cells.TextDirectionType.Context) shape.TextDirection = Aspose.Cells.TextDirectionType.LeftToRight; Gets the text information in the shape Gets the data of control. [C#] if(shape.ControlData == null) Console.WriteLine("No data."); Gets the ActiveX control. [C#] if(shape.ActiveXControl != null) { CheckBoxActiveXControl checkBox1 = (CheckBoxActiveXControl)shape.ActiveXControl; //The font name of CheckBox string fontName = checkBox1.Font.Name; } Remove activeX control. [C#] if(shape.ActiveXControl != null) { shape.RemoveActiveXControl(); } Gets the paths of a custom geometric shape. [C#] //Returns non-null if there is a path to the custom geometry if(shape.Paths == null) Console.WriteLine("No custom geometry path."); Gets the geometry [C#] if (shape.Geometry != null && shape.Geometry.ShapeAdjustValues.Count == 0) Console.WriteLine("No geometry path."); Returns whether the shape is same. [C#] if (shape.IsSameSetting(shape)) Console.WriteLine("Two objects the same."); Gets and sets create id for this shape. Indicates whether the object is decorative. Get the actual position and size of the shape (after applying rotation, flip, etc.) Return the position and size in the order of x, y, w, h Note:The interface is not fully functional, especially the location information is not correct.It is recommended not to use this interface until the function is complete. Recalculate a text area suitable for displaying all text content. Represents the anchor type. Represents a two cell anchor placeholder Represents a one cell anchor placeholder Represents all the shape in a worksheet/chart. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //get ShapeCollection ShapeCollection shapes = workbook.Worksheets[0].Shapes; //do your business //Save the excel file. workbook.Save("result.xlsx"); Gets the object at the specific index in the list. The index. [C#] //get the first shape Shape shape = shapes[0]; Gets the object by the name of the shape. The name of the shape. [C#] //add a shape shapes.AddRectangle(2, 0, 2, 0, 130, 130); //get the shape by the name. Shape shape1 = shapes["Rectangle 1"]; if(shape1 != null) { //Got the shape named 'Rectangle 1'. } Adds and copy a shape to the worksheet. Source shape. The top row index. Represents the vertical offset from its top row, in unit of pixel. The left column index. Represents the horizontal offset from its left column, in unit of pixel. The new object. [C#] //add a shape RectangleShape rectangle = shapes.AddRectangle(2, 0, 2, 0, 130, 130); //Adds and copies a shape. shapes.AddCopy(rectangle, 7, 0, 7, 0); Adds a checkbox to the worksheet. Upper left row index. Represents the vertical offset of checkbox from its top row, in unit of pixel. Upper left column index. Represents the horizontal offset of textbox from its left column, in unit of pixel. Height of textbox, in unit of pixel. Width of textbox, in unit of pixel. The new CheckBox object index. [C#] //add a CheckBox CheckBox checkBox = shapes.AddCheckBox(1, 0, 1, 0, 100, 50); Adds a text box to the worksheet. Upper left row index. Represents the vertical offset of textbox from its top row, in unit of pixel. Upper left column index. Represents the horizontal offset of textbox from its left column, in unit of pixel. Represents the height of textbox, in unit of pixel. Represents the width of textbox, in unit of pixel. A object. [C#] //add a TextBox TextBox textBox = shapes.AddTextBox(1, 0, 1, 0, 100, 50); Add an equation object to the worksheet. The top row index. The vertical offset its top row, in unit of pixel. The left column index. The horizontal offset from its left column, in unit of pixel. The height of equation, in unit of pixel. The width of equation, in unit of pixel. Adds a Spinner to the worksheet. Upper left row index. Represents the vertical offset of Spinner from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of Spinner from its left column, in unit of pixel. Represents the height of Spinner, in unit of pixel. Represents the width of Spinner, in unit of pixel. A Spinner object. [C#] //add a spinner Spinner spinner = shapes.AddSpinner(1, 0, 1, 0, 100, 50); Adds a ScrollBar to the worksheet. Upper left row index. Represents the vertical offset of ScrollBar from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of ScrollBar from its left column, in unit of pixel. Represents the height of ScrollBar, in unit of pixel. Represents the width of ScrollBar, in unit of pixel. A ScrollBar object. [C#] //add a scroll bar ScrollBar scrollBar = shapes.AddScrollBar(1, 0, 1, 0, 100, 20); Adds a RadioButton to the worksheet. Upper left row index. Represents the vertical offset of RadioButton from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of RadioButton from its left column, in unit of pixel. Represents the height of RadioButton, in unit of pixel. Represents the width of RadioButton, in unit of pixel. A RadioButton object. [C#] //add a radio button RadioButton radioButton = shapes.AddRadioButton(1, 0, 1, 0, 100, 50); Adds a ListBox to the worksheet. Upper left row index. Represents the vertical offset of ListBox from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of ListBox from its left column, in unit of pixel. Represents the height of ListBox, in unit of pixel. Represents the width of ListBox, in unit of pixel. A ListBox object. [C#] //add a list box ListBox listBox = shapes.AddListBox(1, 0, 1, 0, 100, 50); Adds a ComboBox to the worksheet. Upper left row index. Represents the vertical offset of ComboBox from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of ComboBox from its left column, in unit of pixel. Represents the height of ComboBox, in unit of pixel. Represents the width of ComboBox, in unit of pixel. A ComboBox object. [C#] //add a combo box ComboBox comboBox = shapes.AddComboBox(1, 0, 1, 0, 100, 50); Adds a GroupBox to the worksheet. Upper left row index. Represents the vertical offset of GroupBox from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of GroupBox from its left column, in unit of pixel. Represents the height of GroupBox, in unit of pixel. Represents the width of GroupBox, in unit of pixel. A GroupBox object. [C#] //add a group box GroupBox groupBox = shapes.AddGroupBox(1, 0, 1, 0, 100, 50); Adds a Button to the worksheet. Upper left row index. Represents the vertical offset of Button from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of Button from its left column, in unit of pixel. Represents the height of Button, in unit of pixel. Represents the width of Button, in unit of pixel. A Button object. [C#] //add a button Button button = shapes.AddButton(1, 0, 1, 0, 100, 50); Adds a Label to the worksheet. Upper left row index. Represents the vertical offset of Label from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of Label from its left column, in unit of pixel. Represents the height of Label, in unit of pixel. Represents the width of Label, in unit of pixel. A Label object. [C#] //add a label Label label = shapes.AddLabel(1, 0, 1, 0, 100, 50); Adds a label to the chart. Represents the vertical offset of label from the upper left corner in units of 1/4000 of the chart area. Represents the vertical offset of label from the upper left corner in units of 1/4000 of the chart area. Represents the height of label, in units of 1/4000 of the chart area. Represents the width of label, in units of 1/4000 of the chart area. A new Label object. Adds a textbox to the chart. Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area. Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area. Represents the height of textbox, in units of 1/4000 of the chart area. Represents the width of textbox, in units of 1/4000 of the chart area. A TextBox object. Inserts a WordArt object to the chart The mso preset text effect type. The WordArt text. The font name. The font size Indicates whether font is bold. Indicates whether font is italic. Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart area. Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart area. Represents the height of shape, in units of 1/4000 of the chart area. Represents the width of shape, in units of 1/4000 of the chart area. Returns a Shape object that represents the new WordArt object. Inserts a WordArt object. The mso preset text effect type. The WordArt text. The font name. The font size Indicates whether font is bold. Indicates whether font is italic. Upper left row index. Represents the vertical offset of shape from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of shape from its left column, in unit of pixel. Represents the height of shape, in unit of pixel. Represents the width of shape, in unit of pixel. Returns a Shape object that represents the new WordArt object. [C#] //add a WordArt Shape wordArt1 = shapes.AddTextEffect(MsoPresetTextEffect.TextEffect10, "WordArt", "arial", 18, false, false, 3, 0, 3, 0, 200, 50); Adds preset WordArt since Excel 2007.s The preset WordArt Style. The text. Upper left row index. Represents the vertical offset of shape from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of shape from its left column, in unit of pixel. Represents the height of shape, in unit of pixel. Represents the width of shape, in unit of pixel. [C#] //add a WordArt Shape wordArt2 = shapes.AddWordArt(PresetWordArtStyle.WordArtStyle1, "WordArt", 3, 0, 3, 0, 50, 200); Adds a RectangleShape to the worksheet. Upper left row index. Represents the vertical offset of RectangleShape from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of RectangleShape from its left column, in unit of pixel. Represents the height of RectangleShape, in unit of pixel. Represents the width of RectangleShape, in unit of pixel. A RectangleShape object. [C#] // add a rectangle RectangleShape rectangleShape = shapes.AddRectangle(2, 0, 2, 0, 130, 130); Adds a Oval to the worksheet. Upper left row index. Represents the vertical offset of Oval from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of Oval from its left column, in unit of pixel. Represents the height of Oval, in unit of pixel. Represents the width of Oval, in unit of pixel. A Oval object. [C#] //add a oval Oval oval = shapes.AddOval(1, 0, 1, 0, 50, 50); Adds a LineShape to the worksheet. Upper left row index. Represents the vertical offset of LineShape from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of LineShape from its left column, in unit of pixel. Represents the height of LineShape, in unit of pixel. Represents the width of LineShape, in unit of pixel. A LineShape object. [C#] // add a line object LineShape lineShape = shapes.AddLine(1, 0, 1, 0, 100, 50); Adds a free floating shape to the worksheet.Only applies for line/image shape. The shape type. Represents the vertical offset of shape from the worksheet's top row, in unit of pixel. Represents the horizontal offset of shape from the worksheet's left column, in unit of pixel. Represents the height of LineShape, in unit of pixel. Represents the width of LineShape, in unit of pixel. The image data,only applies for the picture. Whether the shape use original size if the shape is image. [C#] //add a line Shape floatingShape_Line = shapes.AddFreeFloatingShape(MsoDrawingType.Line, 100, 100, 100, 50, null, false); //add a picture byte[] imageData = null; using(FileStream fs = new FileStream("image.jpg", FileMode.Open)) { int len = (int)fs.Length; imageData = new byte[len]; fs.Read(imageData, 0, len); } Shape floatingShape_Picture = shapes.AddFreeFloatingShape(MsoDrawingType.Picture, 200, 100, 100, 50, imageData, false); Add a shape to chart .All unit is 1/4000 of chart area. The drawing type. the placement type. In unit of 1/4000 chart area width. In unit of 1/4000 chart area height. In unit of 1/4000 chart area width. In unit of 1/4000 chart area height. If the shape is not a picture or ole object,imageData should be null. Add a shape to chart .All unit is 1/4000 of chart area. The drawing type. the placement type. In unit of 1/4000 chart area width. In unit of 1/4000 chart area height. In unit of 1/4000 chart area width. In unit of 1/4000 chart area height. Add a shape to chart. All unit is percent scale of chart area. The drawing type. the placement type. Unit is percent scale of chart area width. Unit is percent scale of chart area height. Unit is percent scale of chart area width. Unit is percent scale of chart area height. Add a shape to chart .All unit is 1/4000 of chart area. The drawing type. the placement type. Unit is percent scale of chart area width. Unit is percent scale of chart area height. Unit is percent scale of chart area width. Unit is percent scale of chart area height. If the shape is not a picture or ole object,imageData should be null. Adds a ArcShape to the worksheet. Upper left row index. Represents the vertical offset of ArcShape from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of ArcShape from its left column, in unit of pixel. Represents the height of ArcShape, in unit of pixel. Represents the width of ArcShape, in unit of pixel. A ArcShape object. [C#] //add a arc ArcShape arcShape = shapes.AddArc(1, 0, 1, 0, 100, 50); Adds a Shape to the worksheet. Mso drawing type. Upper left row index. Represents the vertical offset of Shape from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of Shape from its left column, in unit of pixel. Represents the height of Shape, in unit of pixel. Represents the width of Shape, in unit of pixel. A Shape object. The type could not be Chart/Comment/Picture/OleObject/Polygon/DialogBox [C#] //Add a shape of the specified type Shape shapeByType = shapes.AddShape(MsoDrawingType.CellsDrawing, 1, 0, 1, 0, 100, 50); Adds a AutoShape to the worksheet. Auto shape type. Upper left row index. Represents the vertical offset of Shape from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of Shape from its left column, in unit of pixel. Represents the height of Shape, in unit of pixel. Represents the width of Shape, in unit of pixel. A Shape object. The type could not be Chart/Comment/Picture/OleObject/Polygon/DialogBox [C#] //Adds a AutoShape to the worksheet. Shape autoShape = shapes.AddAutoShape(AutoShapeType.Cube, 1, 0, 1, 0, 100, 50); Adds a AutoShape to the chart. Auto shape type. Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area. Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area. Represents the height of textbox, in units of 1/4000 of the chart area. Represents the width of textbox, in units of 1/4000 of the chart area. Returns a shape object. The type could not be Chart/Comment/Picture/OleObject/Polygon/DialogBox Creates an Activex Control. The type of the control. Upper left row index. Represents the vertical offset of Shape from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of Shape from its left column, in unit of pixel. Represents the height of Shape, in unit of pixel. Represents the width of Shape, in unit of pixel. [C#] //add an ActiveX control Shape activeXControl = shapes.AddActiveXControl(Aspose.Cells.Drawing.ActiveXControls.ControlType.CheckBox, 1, 0, 1, 0, 100, 50); Adds a picture to the collection. Upper left row index. Upper left column index. Lower right row index Lower right column index Stream object which contains the image data. Picture object. [C#] //add a picture using (FileStream fs = new FileStream("image.jpg", FileMode.Open)) { Picture picture = shapes.AddPicture(1, 0, 1, 0, fs); } Adds a picture to the collection. Upper left row index. Upper left column index. Stream object which contains the image data. Scale of image width, a percentage. Scale of image height, a percentage. Picture object. [C#] //add a picture using (FileStream fs = new FileStream("image.jpg", FileMode.Open)) { Picture picture = shapes.AddPicture(1, 1, fs, 50, 60); } Adds svg image. Upper left row index. Represents the vertical offset of shape from its left row, in unit of pixel. Upper left column index. The horizontal offset of shape from its left column, in unit of pixel. The height of shape, in unit of pixel. The width of shape, in unit of pixel. The svg image data. Converted image data from svg in order to be compatible with Excel 2016 or lower versions. [C#] // add a svg using (FileStream fs = new FileStream("image.svg", FileMode.Open)) { int len = (int)fs.Length; byte[] imageData = new byte[len]; fs.Read(imageData, 0, len); Picture picture = shapes.AddSvg(4, 0, 5, 0, -1, -1, imageData, null); } Adds svg image. Upper left row index. Represents the vertical offset of shape from its left row, in unit of pixel. Upper left column index. The horizontal offset of shape from its left column, in unit of pixel. The height of shape, in unit of pixel. The width of shape, in unit of pixel. The image byte data. Converted image data from svg in order to be compatible with Excel 2016 or lower versions. [C#] //add icon using (FileStream fs = new FileStream("icon.svg", FileMode.Open)) { int len = (int)fs.Length; byte[] imageData = new byte[len]; fs.Read(imageData, 0, len); Picture picture = shapes.AddIcons(4, 0, 5, 0, -1, -1, imageData, null); } Add a linked picture. Upper left row index. Upper left column index. The height of the shape. In unit of pixels The width of the shape. In unit of pixels The path and name of the source file for the linked image Picture object. Add a linked picture. Upper left row index. Upper left column index. The height of the shape. In unit of pixels The width of the shape. In unit of pixels The path and name of the source file for the linked image Picture object. Adds a picture to the chart. Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart area. Represents the horizontal offset of shape from the upper left corner in units of 1/4000 of the chart area. Stream object which contains the image data. Scale of image width, a percentage. Scale of image height, a percentage. Returns a Picture object. Adds an OleObject. [C#] using (FileStream fs = new FileStream("image.jpg", FileMode.Open)) { int len = (int)fs.Length; byte[] imageData = new byte[len]; fs.Read(imageData, 0, len); OleObject oleObject = shapes.AddOleObject(4, 0, 5, 0, 300, 500, imageData); } Copy all comments in the range. The source shapes. The source range. The dest range start row. The dest range start column. [C#] CommentCollection comments = workbook.Worksheets[0].Comments; //Add comment to cell A1 int commentIndex = comments.Add(0, 0); Comment comment = comments[commentIndex]; comment.Note = "First note."; comment.Font.Name = "Times New Roman"; //Add comment to cell B2 comments.Add("B2"); comment = comments["B2"]; comment.Note = "Second note."; CellArea area1 = new CellArea(); area1.StartColumn = 1; area1.StartRow = 1; area1.EndColumn = 5; area1.EndRow = 4; //copy shapes.CopyCommentsInRange(shapes, area1, 5, 1); Copy shapes in the range to destination range. Source shapes. The source range. The dest row index of the dest range. The dest column of the dest range. Whether only copy the shapes which are contained in the range. If true,only copies the shapes in the range. Otherwise,it works as MS Office. [C#] //add a shape shapes.AddRectangle(2, 0, 2, 0, 130, 130); CellArea area2 = new CellArea(); area2.StartColumn = 1; area2.StartRow = 1; area2.EndColumn = 5; area2.EndRow = 11; //copy shapes.CopyInRange(shapes, area2, 12, 1, false); Delete shapes in the range.Comment shapes will not be deleted. The range.If the shapes are contained in the range, they will be removed. [C#] //add first shape shapes.AddRectangle(2, 0, 2, 0, 50, 50); //add second shape shapes.AddRectangle(6, 0, 2, 0, 30, 30); CellArea area3 = new CellArea(); area3.StartColumn = 0; area3.StartRow = 5; area3.EndColumn = 5; area3.EndRow = 8; //del shapes.DeleteInRange(area3); Delete a shape. If the shape is in the group or is a comment shape, it will not be deleted. [C#] //add first shape Shape firstShape = shapes.AddRectangle(2, 0, 2, 0, 50, 50); //add second shape Shape secondShape = shapes.AddRectangle(6, 0, 2, 0, 30, 30); //del shapes.DeleteShape(firstShape); Group the shapes. the group items. Return the group shape. The shape in the groupItems should not be grouped. The shape must be in this Shapes collection. [C#] //add first shape shapes.AddRectangle(2, 0, 2, 0, 50, 50); //add second shape shapes.AddRectangle(6, 0, 2, 0, 30, 30); Shape[] shapesArr = new Shape[] { shapes[0], shapes[1] }; GroupShape groupShape = shapes.Group(shapesArr); Ungroups the shape items. The group shape. If the group shape is grouped by another group shape,nothing will be done. [C#] //add first shape shapes.AddRectangle(2, 0, 2, 0, 50, 50); //add second shape shapes.AddRectangle(6, 0, 2, 0, 30, 30); //group Shape[] shapesArr = new Shape[] { shapes[0], shapes[1] }; GroupShape groupShape = shapes.Group(shapesArr); //ungroup shapes.Ungroup(groupShape); Remove the shape. The index of the shape. [C#] //add first shape shapes.AddRectangle(2, 0, 2, 0, 50, 50); //add second shape shapes.AddRectangle(6, 0, 2, 0, 30, 30); //remove shapes.RemoveAt(0); Remove the shape. [C#] //add first shape shapes.AddRectangle(2, 0, 2, 0, 50, 50); //add second shape shapes.AddRectangle(6, 0, 2, 0, 30, 30); //get the shape Shape s = shapes["Rectangle 1"];// or shapes[0]; if (s != null) { //remove shapes.Remove(s); } Clear all shapes in the worksheet. [C#] if (shapes.Count > 0) { shapes.Clear(); } Update the selected value by the value of the linked cell or range of the shape. Adds a freeform shape to the worksheet. Upper left row index. Represents the vertical offset of Polygon from its left row, in unit of pixel. Upper left column index. Represents the horizontal offset of Polygon from its left column, in unit of pixel. Represents the height of Polygon, in unit of pixel. Represents the width of Polygon, in unit of pixel. Represents a user-defined path A freeform shape. [C#] //Custom figure ShapePath shapePath = new ShapePath(); shapePath.MoveTo(60, 45); shapePath.ArcTo(25, 25, 0, 270); shapePath.Close(); shapePath.MoveTo(60, 20); shapePath.LineTo(110, 70); shapePath.LineTo(125, 155.5f); shapePath.ArcTo(35.5f, 35.5f, 0, 270); shapePath.Close(); shapePath.MoveTo(150, 45); shapePath.ArcTo(25, 25, 0, 270); ShapePath shapePath1 = new ShapePath(); shapePath1.MoveTo(0, 0); shapePath1.CubicBezierTo(48.24997f, 0.6844f, 96.5f, -7.148871f, 130, 11.517795f); shapePath1.CubicBezierTo(163.5f, 30.18446f, 182.24997f, 75.351f, 201, 120.517795f); shapePath1.MoveTo(150, 80); shapePath1.ArcTo(25, 25, 0, 270); //Insert custom figure into worksheet shapes.AddFreeform(1, 0, 1, 0, 200, 200, new ShapePath[] { shapePath, shapePath1}); Adds a Signature Line to the worksheet. Upper left row index. Upper left column index. Represents a signature line object. [C#] SignatureLine wSignatureLine = new SignatureLine(); wSignatureLine.AllowComments = true; wSignatureLine.Email = "example@example.com"; wSignatureLine.Instructions = "Sign to confirm the excel content."; wSignatureLine.IsLine = true; wSignatureLine.ShowSignedDate = true; wSignatureLine.Signer = "User"; wSignatureLine.Title = "tester"; //wSignatureLine.SignatureLineType = SignatureType.Stamp; Picture signatureLine1 = shapes.AddSignatureLine(0, 0, wSignatureLine); Represents type of the property to be locked. Group AdjustHandles Text Points Crop Selection Move AspectRatio Rotation Ungroup Resize ShapeType Arrowhead Represent the signature line. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; // Create signature line object SignatureLine s = new SignatureLine(); s.Signer = "Simon"; s.Title = "Development"; s.Email = "simon@aspose.com"; s.Instructions = "Sign to confirm the excel content."; // Adds a Signature Line to the worksheet. Picture signatureLine = worksheet.Shapes.AddSignatureLine(0, 0, s); //do your business //Save the excel file. workbook.Save("result.xlsx"); Gets or sets identifier for this signature line. [C#] // Create signature line object SignatureLine s1 = new SignatureLine(); s1.Id = System.Guid.NewGuid(); Gets or sets the id of signature provider. It's typically the CLSID of the provider com add-in. [C#] // Create signature line object SignatureLine s2 = new SignatureLine(); s2.ProviderId = new Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");//The GUID should be obtained from the documentation shipped with the provider. Gets or sets the signer. [C#] // Create signature line object SignatureLine s3 = new SignatureLine(); s3.Signer = "Mr xxx"; Gets or sets the title of singer. [C#] // Create signature line object SignatureLine s4 = new SignatureLine(); s4.Title = "Development Lead"; Gets or sets the email of singer. [C#] // Create signature line object SignatureLine s5 = new SignatureLine(); s5.Email = "Simon.Zhao@aspose.com"; Indicates whether it is a signature line. [C#] if(s.IsLine) { //Is line. } Indicates whether comments could be attached. [C#] if(s.AllowComments) { // Comments could be attached. } Indicates whether show signed date. [C#] if(s.ShowSignedDate) { //Show signed date. } Gets or sets the text shown to user at signing time. [C#] // Create signature line object SignatureLine s6 = new SignatureLine(); s6.Instructions = "Just do it."; Gets or sets the signature type. Default - When the default value is set, the corresponding ProviderId value is fixed to {0000000000-0000-0000-0000-0000000000}. Stamp - When the value is Stamp, the corresponding ProviderId value is usually {000CD6A4-0000-0000-C000-000000000046}. Custom - When the value is Custom, the corresponding ProviderId value usually needs to be set by the user. it should be obtained from the documentation shipped with the provider. Specifies the signature type. The default value , the corresponding ProviderId value is fixed to {0000000000-0000-0000-0000-0000000000}. The corresponding ProviderId value is usually {000CD6A4-0000-0000-C000-000000000046}. The corresponding ProviderId value usually needs to be set by the user. it should be obtained from the documentation shipped with the provider. Represents the smart art. [C#] //Initialize a new workbook. Workbook book = new Workbook("YourFile.xlsx"); //Gets a SmartArt shape. Shape shape = null; ShapeCollection shapes = book.Worksheets[0].Shapes; foreach(Shape s in shapes) { if(s.MsoDrawingType == Aspose.Cells.Drawing.MsoDrawingType.SmartArt) { //is SmartArt Shape //do what you want break; } } //do your business //Save the excel file. book.Save("exmaple.xlsx"); Converting smart art to grouped shapes. [C#] Aspose.Cells.Drawing.GroupShape groupShape = shape.GetResultOfSmartArt(); if(groupShape != null) { //do what you want } Encapsulates the object that represents a textbox in a spreadsheet. [C#] //Instantiate a new Workbook. Workbook workbook = new Workbook(); //Get the first worksheet in the book. Worksheet worksheet = workbook.Worksheets[0]; //Add a new textbox to the collection. int textboxIndex = worksheet.TextBoxes.Add(2, 1, 160, 200); //Get the textbox object. Aspose.Cells.Drawing.TextBox textbox0 = worksheet.TextBoxes[textboxIndex]; //Fill the text. textbox0.Text = "ASPOSE______The .NET and JAVA Component Publisher!"; //Set the textbox to adjust it according to its contents. textbox0.TextBody.TextAlignment.AutoSize = true; //Set the placement. textbox0.Placement = PlacementType.FreeFloating; //Set the font color. textbox0.Font.Color = Color.Blue; //Set the font to bold. textbox0.Font.IsBold = true; //Set the font size. textbox0.Font.Size = 14; //Set font attribute to italic. textbox0.Font.IsItalic = true; //Add a hyperlink to the textbox. textbox0.AddHyperlink("http://www.aspose.com/"); //Get the filformat of the textbox. FillFormat fillformat = textbox0.Fill; //Set the fillcolor. fillformat.SolidFill.Color = Color.Silver; //Get the lineformat type of the textbox. LineFormat lineformat = textbox0.Line; //Set the line style. lineformat.CompoundType = MsoLineStyle.ThinThick; //Set the line weight. lineformat.Weight = 6; //Set the dash style to squaredot. lineformat.DashStyle = MsoLineDashStyle.SquareDot; //Add another textbox. textboxIndex = worksheet.TextBoxes.Add(15, 4, 85, 120); //Get the second textbox. Aspose.Cells.Drawing.TextBox textbox1 = worksheet.TextBoxes[textboxIndex]; //Input some text to it. textbox1.Text = "This is another simple text box"; //Set the placement type as the textbox will move and //resize with cells. textbox1.Placement = PlacementType.MoveAndSize; //Save the excel file. workbook.Save("tsttextboxes.xlsx"); [Visual Basic] 'Instantiate a new Workbook. Dim workbook As Workbook = New Workbook() 'Get the first worksheet in the book. Dim worksheet As Worksheet = workbook.Worksheets(0) 'Add a new textbox to the collection. Dim textboxIndex As Integer = worksheet.TextBoxes.Add(2, 1, 160, 200) 'Get the textbox object. Dim textbox0 As Aspose.Cells.Drawing.TextBox = worksheet.TextBoxes(textboxIndex) 'Fill the text. textbox0.Text = "ASPOSE______The .NET and JAVA Component Publisher!" 'Set the textbox to adjust it according to its contents. textbox0.TextBody.TextAlignment.AutoSize = True 'Set the placement. textbox0.Placement = PlacementType.FreeFloating 'Set the font color. textbox0.Font.Color = Color.Blue 'Set the font to bold. textbox0.Font.IsBold = True 'Set the font size. textbox0.Font.Size = 14 'Set font attribute to italic. textbox0.Font.IsItalic = True 'Add a hyperlink to the textbox. textbox0.AddHyperlink("http://www.aspose.com/") 'Get the filformat of the textbox. Dim fillformat As FillFormat = textbox0.Fill 'Set the fillcolor. fillformat.SolidFill.Color = Color.Silver 'Get the lineformat type of the textbox. Dim lineformat As LineFormat = textbox0.Line 'Set the line style. lineformat.CompoundType = MsoLineStyle.ThinThick 'Set the line weight. lineformat.Weight = 6 'Set the dash style to squaredot. lineformat.DashStyle = MsoLineDashStyle.SquareDot 'Add another textbox. textboxIndex = worksheet.TextBoxes.Add(15, 4, 85, 120) 'Get the second textbox. Dim textbox1 As Aspose.Cells.Drawing.TextBox = worksheet.TextBoxes(textboxIndex) 'Input some text to it. textbox1.Text = "This is another simple text box" 'Set the placement type as the textbox will move and 'resize with cells. textbox1.Placement = PlacementType.MoveAndSize 'Save the excel file. workbook.Save("tsttextboxes.xlsx") Get the specified math paragraph from the TextBody property of the TextBox object. Notice: (1) Returns NULL when the index is out of bounds or not found. (2) Also returns NULL if the specified index position is not a math paragraph. The position index of the math paragraph, starting from 0. Returns the math paragraph specified by index. Gets the first math paragraph from the TextBody property of the TextBox object. If there has math paragraph, returns the first one, otherwise returns null. Encapsulates a collection of objects. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //get collection object TextBoxCollection textBoxCollection = workbook.Worksheets[0].TextBoxes; //add a textbox textBoxCollection.Add(1, 1, 50, 100); foreach(TextBox tbox in textBoxCollection) { //do what you want } //do your business Gets the element at the specified index. The zero based index of the element. The element at the specified index. [C#] int index = textBoxCollection.Count - 1; TextBox txb = textBoxCollection[index]; Gets the element by the name. The name of the text box. [C#] string txtboxName = "textbox 1"; TextBox txb2 = textBoxCollection[txtboxName]; if(txb2 != null) { //do what you want } Adds a textbox to the collection. Upper left row index. Upper left column index. Height of textbox, in unit of pixel. Width of textbox, in unit of pixel. object index. [C#] //add a TextBox int index2 = textBoxCollection.Add(1, 1, 50, 100); Remove a text box from the file. The text box index. [C#] int index3 = textBoxCollection.Count - 1; textBoxCollection.RemoveAt(index3); Clear all text boxes. [C#] //clear all textbox textBoxCollection.Clear(); Represents automatic numbered bullet. Gets the type of the bullet. Gets and sets the starting number of the bullet. Represents the scheme of automatic number. Represents the bullet points should be applied to a paragraph. Gets the value of bullet. Gets and sets the type of bullet. Get and sets the name of the font. Represents the type of the bullet. No bullet. Character bullet. Image bullet. Automatic numbered bullet. Represents the value of the bullet. Gets the type of the bullet's value. Represents the character bullet. Gets the type of the bullet. Gets and sets character of the bullet. Represents no bullet. Gets the type of the bullet's value. Represents the value of the image bullet. Gets the type of the bullet's value. Gets and sets image data of the bullet. Represents all automatic number scheme. (a), (b), (c), … a), b), c), … a., b., c., … (A), (B), (C), … A), B), C), … A., B., C., … Bidi Arabic 1 (AraAlpha) with ANSI minus symbol Bidi Arabic 2 (AraAbjad) with ANSI minus symbol Dbl-byte Arabic numbers w/ double-byte period Dbl-byte Arabic numbers (1), (2), (3), … 1), 2), 3), … 1., 2., 3., … 1, 2, 3, … Dbl-byte circle numbers (1-10 circle[0x2460-], 11-arabic numbers) Wingdings black circle numbers Wingdings white circle numbers (0-10 circle[0x0080-],11- arabic numbers) EA: Simplified Chinese w/ single-byte period EA: Simplified Chinese (TypeA 1-99, TypeC 100-) EA: Traditional Chinese w/ single-byte period EA: Traditional Chinese (TypeA 1-19, TypeC 20-) EA: Japanese w/ double-byte period EA: Japanese/Korean w/ single-byte period EA: Japanese/Korean (TypeC 1-) Bidi Hebrew 2 with ANSI minus symbol Hindi alphabet period - consonants Hindi alphabet period - vowels /// Hindi numerical parentheses - right Hindi numerical period (i), (ii), (iii), … i), ii), iii), … i., ii., iii., … (I), (II), (III), … I), II), III), … I., II., III., … Thai alphabet parentheses - both Thai alphabet parentheses - right Thai alphabet period Thai numerical parentheses - both Thai numerical parentheses - right Thai numerical period Represents the list of . Sets the preset WordArt style. The preset WordArt style. Represents the alignment setting of the text body. Gets all paragraphs. Gets the enumerator of the paragraphs. Gets and sets the text of the shape. Appends the text. The text. Insert index at the position. The start index. The text. Replace the text. The start index. The count of characters. The text. Replace the text. The old text. The new text. Delete some characters. The start index. The count of characters. Gets and sets the html string which contains data and some formats in this shape. Format the text with font setting. The start index. The length. The font. The flags of the font. Gets the by the index. The index. Clear all setting. Represents the unit type of line space size. Represents in unit of a percentage of the text size. Represents in unit of points. Represents the setting of shape's text alignment; [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Shape shape = workbook.Worksheets[0].Shapes.AddRectangle(1, 0, 1, 0, 50, 100); Aspose.Cells.Drawing.Texts.ShapeTextAlignment shapeTextAlignment = shape.TextBody.TextAlignment; //do your business Gets or sets the text wrapped type of the shape which contains text. [C#] shapeTextAlignment.IsTextWrapped = true; Indicates whether rotating text with shape. [C#] shapeTextAlignment.RotateTextWithShape = true; Gets and sets the text vertical overflow type of the text box. [C#] shapeTextAlignment.TextVerticalOverflow = TextOverflowType.Clip; Gets and sets the text horizontal overflow type of the text box. [C#] shapeTextAlignment.TextHorizontalOverflow = TextOverflowType.Clip; Gets and sets the rotation of the shape. [C#] shapeTextAlignment.RotationAngle = 90; Gets and sets the text direction. [C#] shapeTextAlignment.TextVerticalType = Aspose.Cells.Drawing.Texts.TextVerticalType.Horizontal; Indicates whether the shape is locked when worksheet is protected. Only works when worksheet is protected. Indicates if size of shape is adjusted automatically according to its content. [C#] shapeTextAlignment.AutoSize = false; Gets and set the transform type of text. [C#] //Usually do not modify this value unless you know exactly what the modification will result in shapeTextAlignment.TextShapeType = AutoShapeType.TextBox; Returns the top margin in unit of Points [C#] shapeTextAlignment.TopMarginPt = 2.0d; Returns the bottom margin in unit of Points [C#] shapeTextAlignment.BottomMarginPt = 2.0d; Returns the left margin in unit of Points [C#] shapeTextAlignment.LeftMarginPt = 2.0d; Returns the right margin in unit of Points [C#] shapeTextAlignment.RightMarginPt = 2.0d; Indicates whether the margin of the text frame is automatic. [C#] shapeTextAlignment.IsAutoMargin = true; Gets and sets the number of columns of text in the bounding rectangle. Determines whether this instance has the same value as another specified object. The object to compare with this instance. true if the value of the obj parameter is the same as the value of this instance; otherwise, false. If obj is null, this method returns false. [C#] //You have to make sure that the index value in this line of code exists Aspose.Cells.Drawing.Texts.ShapeTextAlignment obj = workbook.Worksheets[0].Shapes[0].TextBody.TextAlignment; if (shapeTextAlignment.Equals(obj)) { //do what you want } It corresponds to "Format Shape - Text Options - Text Box - Vertical Alignment" in Excel. Represents the text options of the shape [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); int index = workbook.Worksheets[0].TextBoxes.Add(0, 0, 350, 350); Shape shape = workbook.Worksheets[0].TextBoxes[index]; shape.Text = "This is test."; //do your business //Save the excel file. workbook.Save("exmaple.xlsx"); It corresponds to "Format Shape - Text Options - Text Box - Vertical Alignment" in Excel. [C#] shape.TextBoxOptions.ShapeTextVerticalAlignment = ShapeTextVerticalAlignmentType.Left; Indicates whether to resize the shape to fit the text [C#] shape.TextBoxOptions.ResizeToFitText = true; Gets or sets the text display direction within a given text body. It corresponds to "Format Shape - Text Options - Text Box - Text direction" in Excel [C#] shape.TextBoxOptions.ShapeTextDirection = TextVerticalType.Vertical; Gets and sets the left margin in unit of Points. [C#] shape.TextBoxOptions.LeftMarginPt = 0.2d; Gets and sets the right margin in unit of Points. [C#] shape.TextBoxOptions.RightMarginPt = 0.2d; Gets and sets the top margin in unit of Points. [C#] shape.TextBoxOptions.TopMarginPt = 0.2d; Returns the bottom margin in unit of Points [C#] shape.TextBoxOptions.BottomMarginPt = 0.2d; Whether allow text to overflow shape. [C#] shape.TextBoxOptions.AllowTextToOverflow = true; Specifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body. [C#] shape.TextBoxOptions.WrapTextInShape = true; Represents the different types of font alignment. When the text flow is horizontal or simple vertical same as fontBaseline but for other vertical modes same as fontCenter. The letters are anchored to the very bottom of a single line. The letters are anchored to the bottom baseline of a single line. The letters are anchored between the two baselines of a single line. The letters are anchored to the top baseline of a single line. Represents the node type. Represents the text node. Represents the text paragraph. Represents the equation text. Represents the text options. Gets and sets the name of the shape. Gets and sets the user interface language. Gets and sets the latin name. Gets and sets the FarEast name. Represents the fill format of the text. Represents the outline format of the text. Represents a object that specifies shadow effect for the chart element or shape. Gets or sets the color of underline. Specifies the minimum font size at which character kerning will occur for this text run. Specifies the spacing between characters within a text run. Represents the text paragraph setting. Gets the bullet. Gets the type of text node. Gets and sets the amount of vertical white space that will be used within a paragraph. Gets and sets the amount of vertical white space that will be used within a paragraph. Gets and sets the amount of vertical white space that will be present after a paragraph. Gets and sets the amount of vertical white space that will be present after a paragraph. Gets and sets the amount of vertical white space that will be present before a paragraph. Gets and sets the amount of vertical white space that will be present before a paragraph. Gets tab stop list. Specifies whether a Latin word can be broken in half and wrapped onto the next line without a hyphen being added. Specifies whether an East Asian word can be broken in half and wrapped onto the next line without a hyphen being added. Specifies whether punctuation is to be forcefully laid out on a line of text or put on a different line of text. Specifies the right margin of the paragraph. Specifies the left margin of the paragraph. Specifies the indent size that will be applied to the first line of text in the paragraph. Determines where vertically on a line of text the actual words are positioned. This deals with vertical placement of the characters with respect to the baselines. Gets and sets the text horizontal alignment type of the paragraph. Gets and sets the default size for a tab character within this paragraph. Gets all text runs in this paragraph. If this paragraph is empty, return paragraph itself. Represents all text paragraph. Gets the count of text paragraphs. Gets the object at specific index. The index. Gets the enumerator of the paragraphs. Represents the text tab alignment types. The text at this tab stop is center aligned. At this tab stop, the decimals are lined up. The text at this tab stop is left aligned. The text at this tab stop is right aligned. Represents tab stop. Specifies the alignment that is to be applied to text using this tab stop. Specifies the position of the tab stop relative to the left margin. Represents the list of all tab stops. Adds a tab stop. Gets by the index. The index. Represents the text direct type. East Asian Vertical display. Horizontal text. Displayed vertical and the text flows top down then LEFT to RIGHT Each line is 90 degrees rotated clockwise Each line is 270 degrees rotated clockwise Determines if all of the text is vertical Specifies that vertical WordArt should be shown from right to left rather than left to right. The Aspose.Cells.Drawing.Texts namespace provides classes that draw and format texts objects such paragraph, bullet and more. Specifies the position of a particular subobject within its parent At the top of the parent object At the bottom of the parent object Type of combining characters. Use unknown type when not found in existing type. "̇" Unicode: u0307 Combining Dot Above "̈" Unicode: u0308 Combining Diaeresis "⃛" Unicode: u20db Combining Three Dots Above "̂" Unicode: u0302 Combining Circumflex Accent "̌" Unicode: u030c Combining Caron "́" Unicode: u0301 Combining Acute Accent "̀" Unicode: u0300 Combining Grave Accent "̆" Unicode: u0306 Combining Combining Breve "̃" Unicode: u0303 Combining Tilde "̅" Unicode: u0305 Combining Overline "̿" Unicode: u033f Combining Double Overline "⏞" Unicode: u23de Combining Top Curly Bracket "⏟" Unicode: u23df Combining Bottom Curly Bracket "⃖" Unicode: u20d6 Combining Left Arrow Above "⃗" Unicode: u20d7 Combining Right Arrow Above "⃡" Unicode: u20e1 Combining Left Right Arrow Above "⃐" Unicode: u20d0 Combining Left Harpoon Above "⃑" Unicode: u20d1 Combining Right Harpoon Above "←" Unicode: u2190 Leftwards Arrow "→" Unicode: u2192 Rightwards Arrow "↔" Unicode: u2194 Left Right Arrow "⇐" Unicode: u21d0 Leftwards Double Arrow "⇒" Unicode: u21d2 Rightwards Double Arrow "⇔" Unicode: u21d4 Left Right Double Arrow This specifies the shape of delimiters in the delimiter object. The divider is centered around the entire height of its content. The divider is altered to exactly match their contents' height. This specifies the display style of the fraction bar. This specifies that the numerator is above and the denominator below is separated by a bar in the middle. This specifies that the numerator is above and the denominator below is not separated by a bar in the middle. This specifies that the numerator is on the left and the denominator is on the right, separated by a '/' in between. This specifies that the numerator is on the upper left and the denominator is on the lower right, separated by a "/". This specifies the default horizontal justification of equations in the document. Centered Centered as Group Left Justified Right Justified Specifies the limit location on an operator. Specifies that the limit is centered above or below the operator. Specifies that the limit is on the right side of the operator. Mathematical Operators Type Use unknown type when not found in existing type. "∀" Unicode:\u2200 "∁" Unicode:\u2201 "∂" Unicode:\u2202 "∃" Unicode:\u2203 "∄" Unicode:\u2204 "∅" Unicode:\u2205 "∆" Unicode:\u2206 "∇" Unicode:\u2207 "∈" Unicode:\u2208 "∉" Unicode:\u2209 "∊" Unicode:\u220a "∋" Unicode:\u220b "∌" Unicode:\u220c "∍" Unicode:\u220d "∎" Unicode:\u220e "∏" Unicode:\u220f "∐" Unicode:\u2210 "∑" Unicode:\u2211 "∧" Unicode:\u2227 "∨" Unicode:\u2228 "∩" Unicode:\u2229 "∪" Unicode:\u222a "∫" Unicode:\u222b "∬" Unicode:\u222c "∭" Unicode:\u222d "∮" Unicode:\u222e "∯" Unicode:\u222f "∰" Unicode:\u2230 "∱" Unicode:\u2231 "∲" Unicode:\u2232 "∳" Unicode:\u2233 "⋀" Unicode:\u22c0 "⋁" Unicode:\u22c1 "⋂" Unicode:\u22c2 "⋃" Unicode:\u22c3 Equation node type. Notice: (1)[1-99] Currently there is only one node in the scope, and its enumeration value is 1. The node it specifies is used to store mathematical text. (2)[100-199] Indicates that the node is a component of some special function nodes. (3)[200-] Indicates that the node has some special functions. UnKnow specifies a node that stores math text Specifies a Base component Specifies a Denominator component Specifies a Numerator component Specifies a FunctionName component Specifies a Subscript component Specifies a Superscript component Specifies a Degree component Specifies a MatrixRow component.A single row of the matrix Represents a sub-object of Lower-Limit function or Upper-Limit function Specifies a mathematical paragraph(oMathPara). Specifies an equation or mathematical expression(OMath). NOTE: This member is now obsolete. Instead, please use EquationNodeType.Mathematical. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies fractional equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.Fraction. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies function equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.Function. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies delimiter equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.Delimiter. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies n-ary operator equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.Nary. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies the radical equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.Radical. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies superscript equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.Sup. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies subscript equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.Sub. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies an equation with superscripts and subscripts to the right of the operands. NOTE: This member is now obsolete. Instead, please use EquationNodeType.SubSup. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies an equation with superscripts and subscripts to the left of the operands. NOTE: This member is now obsolete. Instead, please use EquationNodeType.PreSubSup. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies accent equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.Accent. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies bar equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.Bar. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies border box equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.BorderBox. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies box equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.Box. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies Group-Character equation NOTE: This member is now obsolete. Instead, please use EquationNodeType.GroupChr. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies the Matrix equation, NOTE: This member is now obsolete. Instead, please use EquationNodeType.Matrix. This property will be removed 12 months later since September 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies the Lower-Limit function Specifies the Upper-Limit function Specifies an equation or mathematical expression(OMath). Specifies fractional equation Specifies function equation Specifies delimiter equation Specifies n-ary operator equation Specifies the radical equation Specifies superscript equation Specifies subscript equation Specifies an equation with superscripts and subscripts to the right of the operands. Specifies an equation with superscripts and subscripts to the left of the operands. Specifies accent equation Specifies bar equation Specifies border box equation Specifies box equation Specifies Group-Character equation Specifies the Matrix equation, Specifies the Equation-Array function. The function consists of one or more equations. This specifies the default vertical justification of equations in the document. top center bottom This class specifies an accent equation, consisting of a base component and a combining diacritic. This attribute specifies the type of combining diacritical mark attached to the base of the accent function. The default accent character is U+0302. It is strongly recommended to use attribute AccentType to set accent character. Use this property setting if you cannot find the character you need in a known type. It should be noted that this property only accepts one character, and if multiple characters are passed in, only the first character is accepted. Specify combining characters by type value. Determine whether the current equation node is equal to the specified node The specified node Specifies the Equation-Array function, an object consisting of one or more equations. Determine whether the current equation node is equal to the specified node The specified node This class specifies the bar equation, consisting of a base argument and an overbar or underbar. This attribute specifies the position of the bar in the bar object Determine whether the current equation node is equal to the specified node The specified node This class specifies the Border Box function, consisting of a border drawn around an equation. Determine whether the current equation node is equal to the specified node The specified node This class specifies the box function, which is used to group components of an equation. Determine whether the current equation node is equal to the specified node The specified node This class specifies the delimiter equation, consisting of opening and closing delimiters (such as parentheses, braces, brackets, and vertical bars), and a component contained inside. The delimiter may have more than one component, with a designated separator character between each component. Delimiter beginning character. It should be noted that this property only accepts one character, and if multiple characters are passed in, only the first character is accepted. Delimiter ending character. It should be noted that this property only accepts one character, and if multiple characters are passed in, only the first character is accepted. This property specifies the growth property of the delimiter at the document level. When off, the delimiter will not grow to match the size of its component height. When enabled, the delimiter grows vertically to match its component height. Delimiter separator character. It should be noted that this property only accepts one character, and if multiple characters are passed in, only the first character is accepted. Specifies the shape of delimiters in the delimiter object. Determine whether the current equation node is equal to the specified node The specified node This class specifies the components of an equation or mathematical expression. Different types of components combined into different equations. For example, a fraction consists of two parts, a numerator component and a denominator component. For more component types, please refer to 'EquationNodeType'. Determine whether the current equation node is equal to the specified node The specified node Abstract class for deriving other equation nodes. Specifies the parent node of the current node Convert this equtation to LaTeX expression. Convert this equtation to MathML expression. Insert a node of the specified type at the end of the child node list of the current node. Types of Equation Nodes If the specified type exists, the corresponding node is returned, and if the type does not exist, a node of unknown type is returned. Inserts the specified node at the end of the current node's list of child nodes. The specified node Inserts a node of the specified type at the specified index position in the current node's child node list. index value Types of Equation Nodes If the specified type exists, the corresponding node is returned, and if the type does not exist, a node of unknown type is returned. Inserts the specified node after the current node. Types of Equation Nodes If the specified type exists, the corresponding node is returned, and if the type does not exist, a node of unknown type is returned. Inserts the specified node before the current node. Types of Equation Nodes If the specified type exists, the corresponding node is returned, and if the type does not exist, a node of unknown type is returned. Returns the node at the specified index among the children of the current node. Index of the node Returns the corresponding node if the specified node exists, otherwise returns null. Removes itself from the parent. Removes the specified node from the current node's children. Node to be deleted. Removes the node at the specified index from the current node's children. Index of the node Removes all the child nodes of the current node. Determine whether the current equation node is equal to the specified node The specified node Create a node of the specified type. Types of Equation Nodes The workbook object associated with the equation The parent node where this node is located If the specified type exists, the corresponding node is returned, and if the type does not exist, a node of unknown type is returned. Represents the type of the node. Get the equation type of the current node This class specifies a mathematical paragraph containing one or more MathEquationNode(OMath) elements. This specifies justification of the math paragraph (a series of adjacent equations within the same paragraph). A math paragraph can be Left Justified, Right Justified, Centered, or Centered as Group. By default, the math paragraph is Centered as Group. This means that the equations can be aligned with respect to each other, but the entire group of equations is centered as a whole. Determine whether the current equation node is equal to the specified node The specified node This class specifies the fraction equation, consisting of a numerator and denominator separated by a fraction bar. The fraction bar can be horizontal or diagonal, depending on the fraction properties. The fraction equation is also used to represent the stack function, which places one element above another, with no fraction bar. This specifies the type of fraction ; the default is 'Bar'. Determine whether the current equation node is equal to the specified node The specified node This class specifies the Function-Apply equation, which consists of a function name and an argument acted upon. The types of the name and argument components are 'EquationNodeType.FunctionName' and 'EquationNodeType.Base' respectively. Determine whether the current equation node is equal to the specified node The specified node This class specifies the Group-Character function, consisting of a character drawn above or below text, often with the purpose of visually grouping items. Specifies a symbol(default U+23DF). It is strongly recommended to use attribute ChrType to set accent character. Use this property setting if you cannot find the character you need in a known type. It should be noted that this property only accepts one character, and if multiple characters are passed in, only the first character is accepted. Specify combining characters by type value. This attribute specifies the position of the character in the object This attribute, combined with pos of groupChrPr, specifies the vertical layout of the groupChr object. Where pos specifies the position of the grouping character, vertJc specifies the alignment of the object with respect to the baseline. Determine whether the current equation node is equal to the specified node The specified node This class specifies the limit function. Determine whether the current equation node is equal to the specified node The specified node This class specifies an equation or mathematical expression. All mathematical text of equations or mathematical expressions are contained by this class. Determine whether the current equation node is equal to the specified node The specified node This class specifies the Matrix equation, consisting of one or more elements laid out in one or more rows and one or more columns. This attribute specifies the justification of the matrix. Text outside of the matrix can be aligned with the bottom, top, or center of a matrix function. Default, the matrix assumes center justification. This attribute specifies the Hide Placeholders property on a matrix. When this property is on, placeholders do not appear in the matrix.Default, placeholders do appear such that the locations where text can be inserted are made visible. Determine whether the current equation node is equal to the specified node The specified node This class specifies an n-ary operator equation consisting of an n-ary operator, a base (or operand), and optional upper and lower bounds. Whether to display the lower bound Whether to display the upper bound This attribute specifies the location of limits in n-ary operators. Limits can be either centered above and below the n-ary operator, or positioned just to the right of the operator. an n-ary operator.e.g "∑". It is strongly recommended to use attribute NaryOperatorType to set n-ary operator. Use this property setting if you cannot find the character you need in a known type. It should be noted that this property only accepts one character, and if multiple characters are passed in, only the first character is accepted. an n-ary operator.e.g "∑" This attribute specifies the growth property of n-ary operators at the document level. When off, n-ary operators such as integrals and summations do not grow to match the size of their operand height. When on, the n-ary operator grows vertically to match its operand height. Determine whether the current equation node is equal to the specified node The specified node This class specifies the radical equation, consisting of an optional degree deg(EquationNodeType.Degree) and a base. Whether to hide the degree of radicals. Determine whether the current equation node is equal to the specified node The specified node This class specifies an equation that can optionally be superscript or subscript. There are four main forms of this equation, superscript,subscript,superscript and subscript placed to the left of the base, superscript and subscript placed to the right of the base. Determine whether the current equation node is equal to the specified node The specified node This class in the equation node is used to store the actual content(a sequence of mathematical text) of the equation. Usually a node object per character. Set the content of the text node(Usually a node object per character). Determine whether the current equation node is equal to the specified node The specified node Equation node class of unknown type Determine whether the current equation node is equal to the specified node The specified node The Aspose.Cells.Drawing.Equations namespace provides classes for creating various equation shapes (such as fractional equations, power equations, etc.) through equation nodes. Contains properties and methods that apply to WordArt objects. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Aspose.Cells.Drawing.ShapeCollection shapes = workbook.Worksheets[0].Shapes; shapes.AddTextEffect(MsoPresetTextEffect.TextEffect1, "Aspose", "Arial", 30, false, false, 0, 0, 0, 0, 100, 200); TextEffectFormat textEffectFormat = shapes[0].TextEffect; textEffectFormat.SetTextEffect(MsoPresetTextEffect.TextEffect10); workbook.Save("Book1.xls"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() Dim shapes As Aspose.Cells.Drawing.ShapeCollection = workbook.Worksheets(0).Shapes shapes.AddTextEffect(MsoPresetTextEffect.TextEffect1, "Aspose", "Arial", 30, false, false, 0, 0, 0, 0, 100, 200) Dim textEffectFormat As TextEffectFormat = shapes(0).TextEffect TextEffectFormat.SetTextEffect(MsoPresetTextEffect.TextEffect10) workbook.Save("Book1.xls") Sets the preset text effect. The preset text effect. The text in the WordArt. The name of the font used in the WordArt. Indicates whether font is bold. Indicates whether font is italic. If true,characters in the specified WordArt are rotated 90 degrees relative to the WordArt's bounding shape. The size (in points) of the font used in the WordArt. Gets and sets the preset shape type. Represents the way the text vertical or horizontal overflow. Pay attention to top and bottom barriers. Provide no indication that there is text which is not visible. Pay attention to top and bottom barriers. Use an ellipsis to denote that there is text which is not visible. Only for vertical overflow. Overflow the text and pay no attention to top and bottom barriers. Represents the shape of web extension. Gets and set the web extension. Represents the preset WordArt styles. Fill - Black, Text 1, Shadow Fill - Blue, Accent 1, Shadow Fill - Orange, Accent 2, Outline - Accent 2 Fill - White, Outline - Accent 1, Shadow Fill - Gold, Accent 4, Soft Bevel Gradient Fill - Gray Gradient Fill - Blue, Accent 1, Reflection Gradient Fill - Gold, Accent 4, Outline - Accent 4 Fill - White, Outline - Accent 1, Glow - Accent 1 Fill - Gray-50%, Accent 3, Sharp Bevel Fill - Black, Text 1, Outline - Background 1, Hard Shadow - Background 1 Fill - Black, Text 1, Outline - Background 1, Hard Shadow - Accent 1 Fill - Blue, Accent 1, Outline - Background 1, Hard Shadow - Accent 1 Fill - White, Outline - Accent 2, Hard Shadow - Accent 2 Fill - Gray-25%, Background 2, Inner Shadow Pattern Fill - White, Text 2, Dark Upward Diagonal, Shadow Pattern Fill - Gray-50%, Accent 3, Narrow Horizontal, Inner Shadow Fill - Blue, Accent 1, 50%, Hard Shadow - Accent 1 Pattern Fill - Blue, Accent 1, Light Downward Diagonal, Outline - Accent 1 Pattern Fill - Blue-Gray, Text 2, Dark Upward Diagonal, Hard Shadow - Text 2 The Aspose.Cells.Drawing namespace provides classes that allow to create and modify drawing shapes, form controls, and more advanced drawing objects. Encapsulates the object that represents an axis of chart. From the following codes , you can learn how to set unit, maximum and minimum value of Axis. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Excel object int sheetIndex = workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[sheetIndex]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(4); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(20); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 25, 5); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", true); //Set the max value of value axis chart.ValueAxis.MaxValue = 200; //Set the min value of value axis chart.ValueAxis.MinValue = 0; //Set the major unit chart.ValueAxis.MajorUnit = 25; //Category(X) axis crosses at the maxinum value. chart.ValueAxis.CrossType = CrossType.Maximum; //Set he number of categories or series between tick-mark labels. chart.CategoryAxis.TickLabelSpacing = 2; //do your business //Saving the Excel file workbook.Save("book1.xlsx"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Excel object Dim sheetIndex As Int32 = workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(4) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(20) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a chart to the worksheet Dim chartIndex As Int32 = worksheet.Charts.Add(ChartType.Column, 5, 0, 25, 5) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", True) 'Set the max value of value axis chart.ValueAxis.MaxValue = 200 'Set the min value of value axis chart.ValueAxis.MinValue = 0 'Set the major unit chart.ValueAxis.MajorUnit = 25 'Category(X) axis crosses at the maxinum value. chart.ValueAxis.CrossType = CrossType.Maximum 'Set he number of categories or series between tick-mark labels. chart.CategoryAxis.TickLabelSpacing = 2 'Saving the Excel file workbook.Save("book1.xlsx") Gets the . Indicates whether the min value is automatically assigned. Represents the minimum value on the value axis. The minValue type only can be double or DateTime Indicates whether the max value is automatically assigned. Represents the maximum value on the value axis. The maxValue type only can be double or DateTime Indicates whether the major unit of the axis is automatically assigned. Represents the major units for the axis. The major units must be greater than zero. Indicates whether the minor unit of the axis is automatically assigned. Represents the minor units for the axis. The minor units must be greater than zero. Gets the appearance of an Axis. Represents the type of major tick mark for the specified axis. Represents the type of minor tick mark for the specified axis. Represents the position of tick-mark labels on the specified axis. Represents the point on the value axis where the category axis crosses it. The number should be a integer when it applies to category axis. And the value must be between 1 and 31999. Represents the on the specified axis where the other axis crosses. Represents the logarithmic base. Default value is 10.Only applies for Excel2007. Represents if the value axis scale type is logarithmic or not. Represents if Microsoft Excel plots data points from last to first. Represents if the value axis crosses the category axis between categories. This property applies only to category axes, and it doesn't apply to 3-D charts. Returns a object that represents the tick-mark labels for the specified axis. Represents the number of categories or series between tick-mark labels. Applies only to category and series axes. The number must be between 1 and 31999. Indicates whether the spacing of tick label is automatic Returns or sets the number of categories or series between tick marks. Applies only to category and series axes. The number must be between 1 and 31999. Represents the unit label for the specified axis. Specifies a custom value for the display unit. NOTE: This property is now obsolete. Instead, please use Axis.CustomUnit property. This property will be removed 12 months later since January 2023. Aspose apologizes for any inconvenience you may have experienced. Specifies a custom value for the display unit. NOTE: This property is now obsolete. Instead, please use Axis.CustomDisplayUnit property. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Specifies a custom value for the display unit. Represents a unit label on an axis in the specified chart. Unit labels are useful for charting large values— for example, in the millions or billions. Represents if the display unit label is shown on the specified axis. The default value is True. Gets the axis' title. Represents the category axis type. Represents the base unit scale for the category axis. Setting this property only takes effect when the CategoryType property is set to TimeScale. Represents the major unit scale for the category axis. [C#] chart.CategoryAxis.CategoryType = CategoryType.TimeScale; chart.CategoryAxis.MajorUnitScale = TimeUnit.Months; chart.CategoryAxis.MajorUnit = 2; [Visual Basic] chart.CategoryAxis.CategoryType = CategoryType.TimeScale chart.CategoryAxis.MajorUnitScale = TimeUnit.Months chart.CategoryAxis.MajorUnit = 2 Represents the major unit scale for the category axis. [C#] chart.CategoryAxis.CategoryType = CategoryType.TimeScale; chart.CategoryAxis.MinorUnitScale = TimeUnit.Months; chart.CategoryAxis.MinorUnit = 2; [Visual Basic] chart.CategoryAxis.CategoryType = CategoryType.TimeScale chart.CategoryAxis.MinorUnitScale = TimeUnit.Months chart.CategoryAxis.MinorUnit = 2 Represents if the axis is visible. Represents major gridlines on a chart axis. [C#] chart.ValueAxis.MajorGridLines.IsVisible = false; chart.CategoryAxis.MajorGridLines.IsVisible = true; [Visual Basic] chart.ValueAxis.MajorGridLines.IsVisible = false chart.CategoryAxis.MajorGridLines.IsVisible = true Represents minor gridlines on a chart axis. Indicates whether the labels shall be shown as multi level. Only valid for category axis. Gets the labels of the axis after call Chart.Calculate() method. Gets the labels of the axis after call Chart.Calculate() method. NOTE: This member is now obsolete. Instead, please use Axis.GetAxisTexts method. This property will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced. Represents bins on a chart(Histogram/Pareto) axis Represents axis bins Indicates whether grouping data by category Indicates whether the axis bins are automatic. Gets or sets the width of axis bin Gets or set the count of axis bins Gets or set the overflow of axis bins Gets or set the underflow of axis bins Reset the overflow NOTE: This method is now obsolete. This is an internal method that does not need to be called externally to avoid causing problems. This property will be removed 12 months later since July 2024. Aspose apologizes for any inconvenience you may have experienced. Reset the underflow NOTE: This method is now obsolete. This is an internal method that does not need to be called externally to avoid causing problems. This property will be removed 12 months later since July 2024. Aspose apologizes for any inconvenience you may have experienced. Represents the axis type. Category axis Value axis Series axis Represents the display mode of the background. Automatic Opaque Transparent Represents the shape used with the 3-D bar or column chart. Box PyramidToPoint PyramidToMax Cylinder ConeToPoint ConeToMax Represents what the bubble size represents on a bubble chart. Represents the value of is area of the bubble. Represents the value of is width of the bubble. Represents the category axis type. AutomaticScale CategoryScale TimeScale Encapsulates the object that represents a single Excel chart. The following codes show how to create a chart with .Net codes. [C#] Workbook workbook = new Workbook(); Worksheet sheet = workbook.Worksheets[0]; Cells cells = sheet.Cells; cells[0,1].PutValue("Income"); cells[1,0].PutValue("Company A"); cells[2,0].PutValue("Company B"); cells[3,0].PutValue("Company C"); cells[1,1].PutValue(10000); cells[2,1].PutValue(20000); cells[3,1].PutValue(30000); int chartIndex = sheet.Charts.Add(ChartType.Column, 9, 9, 21, 15); Chart chart = sheet.Charts[chartIndex]; chart.SetChartDataRange("A1:B4", true); chart.ShowLegend = true; chart.Title.Text = "Income Analysis"; [Visual Basic] Dim workbook as Workbook = new Workbook() Dim sheet as Worksheet = workbook.Worksheets(0) Dim cells as Cells = sheet.Cells cells(0,1).PutValue("Income") cells(1,0).PutValue("Company A") cells(2,0).PutValue("Company B") cells(3,0).PutValue("Company C") cells(1,1).PutValue(10000) cells(2,1).PutValue(20000) cells(3,1).PutValue(30000) Dim chartIndex as Integer = sheet.Charts.Add(ChartType.Column, 9, 9, 21, 15) Dim chart as Chart = sheet.Charts(chartIndex) chart.SetChartDataRange("A1:B4", True); chart.ShowLegend = True chart.Title.Text = "Income Analysis" Gets and sets the builtin style. It should be between 1 and 48. Return -1 if it's not be set. Represents the chartShape; Indicates whether hide the pivot chart field buttons only when the chart is PivotChart. Specifies the pivot controls that appear on the chart The source is the data of the pivotTable. If PivotSource is not empty ,the chart is PivotChart. If the pivot table "PivotTable1" in the Worksheet "Sheet1" in the file "Book1.xls". The pivotSource could be "[Book1.xls]Sheet1!PivotTable1" if the chart and the PivotTable is not in the same workbook. If you set this property ,the previous data source setting will be lost. Returns whether the cell refered by the chart. The row index The column index NOTE: This method is now obsolete. Instead, please use IsCellReferedByChart(int,int,int) method. This method will be removed 12 months later since April 2023. Aspose apologizes for any inconvenience you may have experienced. Returns whether the cell refered by the chart. The sheet Index.-1 means the worksheet which contains current chart. The row index The column index Detects if a chart's data source has changed. The method detects the changes in the chart's data source before rendering the chart to image format. At first Chart.toImage call, the chart source data (e.g. XValuesParseData, ValuesParseData) will be recorded. Before calling the Chart.toImage method again, call IsChartDataChanged method to check if Chart needs re-rendering. Returns true if the chart has changed otherwise returns false Gets and sets whether plot by row or column. Refreshes chart's data from pivot table. We will gather data from pivot data source to the pivot table report. This method is only used to gather all data to a pivot chart. Gets and sets how to plot the empty cells. Indicates whether only plot visible cells. NOTE: This member is now obsolete. Instead, please use PlotVisibleCellsOnly property. This method will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Indicates whether plot visible cells only. Indicates whether displaying #N/A as blank value. Gets and sets the name of the chart. True if Microsoft Excel resizes the chart to match the size of the chart sheet window. Gets the worksheet which contains this chart. Returns all drawing shapes in this chart. Gets and sets the printed chart size. Change chart type with preset template. The data of chart template file(.crtx). Gets or sets a chart's type. Moves the chart to a specified location. Upper left column index. Upper left row index. Lower right column index Lower right row index Gets a collection representing the data series in the chart. Gets a collection representing the data series that are filtered in the chart. Gets the chart's title. Gets the chart's sub-title. Only for ODS format file. Gets the chart's plot area which includes axis tick labels. Gets the chart area in the worksheet. Gets the chart's X axis. Gets the chart's Y axis. Gets the chart's second Y axis. Gets the chart's second X axis. Gets the chart's series axis. Gets the chart legend. Represents the chart data table. Gets or sets a value indicating whether the chart legend will be displayed. Default is true. Gets or sets a value indicating whether the chart area is rectangular cornered. Default is true. Gets or sets a value indicating whether the chart displays a data table. Gets or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts, 0 to 360. Returns or sets the space between bar or column clusters, as a percentage of the bar or column width. The value of this property must be between 0 and 500. Gets or sets the distance between the data series in a 3-D chart, as a percentage of the marker width. The value of this property must be between 0 and 500. Calculates the custom position of plot area, axes if the position of them are auto assigned. Calculates the custom position of plot area, axes if the position of them are auto assigned, with Chart Calculate Options. Returns a object that represents the walls of a 3-D chart. This property doesn't apply to 3-D pie charts. Returns a object that represents the walls of a 3-D chart. This property doesn't apply to 3-D pie charts. Returns a object that represents the back wall of a 3-D chart. Returns a object that represents the side wall of a 3-D chart. True if gridlines are drawn two-dimensionally on a 3-D chart. Represents the rotation of the 3-D chart view (the rotation of the plot area around the z-axis, in degrees). The value of this property must be from 0 to 360, except for 3-D bar charts, where the value must be from 0 to 44. The default value is 20. Applies only to 3-D charts. Represents the elevation of the 3-D chart view, in degrees. The chart elevation is the height at which you view the chart, in degrees. The default is 15 for most chart types. The value of this property must be between -90 and 90, except for 3-D bar charts, where it must be between 0 and 44. True if the chart axes are at right angles. Applies only for 3-D charts(except Column3D and 3-D Pie Charts). If this property is True, the Perspective property is ignored. True if Microsoft Excel scales a 3-D chart so that it's closer in size to the equivalent 2-D chart. The RightAngleAxes property must be True. Returns or sets the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent). Returns or sets the perspective for the 3-D chart view. Must be between 0 and 100. This property is ignored if the RightAngleAxes property is True. Indicates whether the chart is a 3d chart. Represents the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent). Creates the chart image and saves it to a file. The extension of the file name determines the format of the image. The image file name with full path.

The format of the image is specified by using the extension of the file name. For example, if you specify "myfile.png", then the image will be saved in the PNG format. The following file extensions are recognized: .bmp, .gif, .png, .jpg, .jpeg, .tiff, .tif, .emf.

If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing.
Creates the chart image and saves it to a file in the specified image type. The image file name with full path. The image type in which to save the image.

The type of the image is specified by using imageType. The following types are supported: ImageType.Bmp, ImageType.Gif, ImageType.Png, ImageType.Jpeg, ImageType.Tiff, ImageType.Emf.

If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing.
Creates the chart image and saves it to a file in the Jpeg format. The image file name with full path. Jpeg quality. If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing. NOTE: This method is now obsolete. Instead, please use ToImage(string,ImageOrPrintOptions) method with specified quality. This method will be removed 12 months later since March 2025. Aspose apologizes for any inconvenience you may have experienced. Creates the chart image and saves it to a stream in the Jpeg format. The output stream. Jpeg quality. If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing. Creates the chart image and saves it to a stream in the specified format. The output stream. The image type in which to save the image.

The type of the image is specified by using imageType. The following types are supported: ImageType.Bmp, ImageType.Gif, ImageType.Png, ImageType.Jpeg, ImageType.Tiff, ImageType.Emf.

If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing.
Saves the chart to a pdf file. the pdf file name with full path Saves the chart to a pdf file. the pdf file name with full path The desired page width in inches. The desired page height in inches. The chart horizontal alignment type in the output page. The chart vertical alignment type in the output page. Creates the chart pdf and saves it to a stream. The output stream. Creates the chart pdf and saves it to a stream. The output stream. The desired page width in inches. The desired page height in inches. The chart horizontal alignment type in the output page. The chart vertical alignment type in the output page. Creates the chart image and saves it to a file. The extension of the file name determines the format of the image. The image file name with full path. Additional image creation options

The format of the image is specified by using the extension of the file name. For example, if you specify "myfile.png", then the image will be saved in the PNG format. The following file extensions are recognized: .bmp, .gif, .png, .jpg, .jpeg, .tiff, .tif, .emf.

If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing. Please refer to Supported Charts List for more details.
Saves to Tiff with 300 dpi and CCITT4 compression. [C#] ImageOrPrintOptions options = new ImageOrPrintOptions(); options.HorizontalResolution = 300; options.VerticalResolution = 300; options.TiffCompression = TiffCompression.CompressionCCITT4; Workbook book = new Workbook(@"test.xls"); book.Worksheets[0].Charts[0].ToImage(@"chart.Tiff", options); [VB] Dim options As ImageOrPrintOptions = New ImageOrPrintOptions() options.HorizontalResolution = 300 options.VerticalResolution = 300 options.TiffCompression = TiffCompression.CompressionCCITT4 Dim book As Workbook = New Workbook("test.xls") book.Worksheets(0).Charts(0).ToImage("chart.Tiff", options) Saves to Jpeg with 300 dpi and 80 image quality. [C#] ImageOrPrintOptions options = new ImageOrPrintOptions(); options.HorizontalResolution = 300; options.VerticalResolution = 300; options.Quality = 80; Workbook book = new Workbook(@"test.xls"); book.Worksheets[0].Charts[0].ToImage(@"chart.Jpeg", options); [VB] Dim options As ImageOrPrintOptions = New ImageOrPrintOptions() options.HorizontalResolution = 300 options.VerticalResolution = 300 options.Quality = 80 Dim book As Workbook = New Workbook("test.xls") book.Worksheets(0).Charts(0).ToImage("chart.Jpeg", options)
Creates the chart image and saves it to a stream in the specified format. The output stream. Additional image creation options

The type of the image is specified by using options.ImageType. The following formats are supported: ImageType.Bmp, ImageType.Gif, ImageType.Png, ImageType.Jpeg, ImageType.Tiff, ImageType.Emf.

If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing. Please refer to Supported Charts List for more details.
Gets actual size of chart in unit of pixels. NOTE: This member is now obsolete. Instead, please use Chart.GetActualSize() method. This property will be removed 12 months later since July 2022. Aspose apologizes for any inconvenience you may have experienced. Gets actual size of chart in unit of pixels. Actual size in an array(width and height). [0] is width; [1] is height. Represents the way the chart is attached to the cells below it. Represents the page setup description in this chart. Returns which axes exist on the chart. Normally, Pie, PieExploded, PiePie,PieBar, Pie3D, Pie3DExploded,Doughnut, DoughnutExploded is no axis. Switches row/column. False means switching row/column fails. Gets the data source range of the chart. The data source. Only supports range. Specifies data range for a chart. Specifies values from which to plot the data series Specifies whether to plot the series from a range of cell values by row or by column. Gets the line. Encapsulates the object that represents the chart area in the worksheet. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the first worksheet Worksheet worksheet = workbook.Worksheets[0]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(60); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(32); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", true); //Getting Chart Area ChartArea chartArea = chart.ChartArea; //Setting the foreground color of the chart area chartArea.Area.ForegroundColor = Color.Yellow; //Setting Chart Area Shadow chartArea.Shadow = true; //Saving the Excel file workbook.Save("book1.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the first worksheet Dim worksheet As Worksheet = workbook.Worksheets(0) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(60) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(32) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a chart to the worksheet Dim chartIndex As Integer = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", True) 'Getting Chart Area Dim chartArea As ChartArea = chart.ChartArea 'Setting the foreground color of the chart area chartArea.Area.ForegroundColor = Color.Yellow 'Setting Chart Area Shadow chartArea.Shadow = True 'Saving the Excel file workbook.Save("book1.xls") Gets or gets the horizontal offset from its upper left corner column, in units of 1/4000 of the chart area. NOTE: This member is now obsolete. Please use ChartArea.XRatioToChart property, instead. X = XRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Gets or gets the vertical offset from its upper left corner row, in units of 1/4000 of the chart area. NOTE: This member is now obsolete. Please use ChartArea.YRatioToChart property, instead. Y = YRatioToChart * 4000; This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Gets or sets the vertical offset from its lower right corner row, in units of 1/4000 of the chart area. NOTE: This member is now obsolete. Please use ChartArea.HeightRatioToChart property, instead. Height = HeightRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Gets or sets the horizontal offset from its lower right corner column, in units of 1/4000 of the chart area. NOTE: This member is now obsolete. Please use ChartArea.WidthRatioToChart property, instead. Width = WidthRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Gets or gets the horizontal offset from its upper left corner column, in units of ratio of the chart area. Gets or gets the vertical offset from its upper left corner row, in units of ratio of the chart area. Gets or sets the vertical offset from its lower right corner row, in units of ratio of the chart area. Gets or sets the horizontal offset from its lower right corner column, in units of ratio of the chart area. Gets a object of the specified chartarea object. Represents the options for calculating chart. Creates the options for calculating chart. Whether update all data points when performing the chart calculation. Default: False. When you want to get the value for each data point in the chart specifically, set it to true. If this parameter is set to True, the new data points may be generated when chart is calculated. This could make the Excel file larger. Encapsulates a collection of objects. [C#] Workbook workbook = new Workbook(); ChartCollection charts = workbook.Worksheets[0].Charts; [Visual Basic] Dim workbook as Workbook = new Workbook() Dim ChartCollection as Charts = workbook.Worksheets(0).Charts Adds a chart to the collection. Chart type The x offset to corner The y offset to corner The chart width The chart height object index. Adds a chart to the collection. Chart type Upper left row index. Upper left column index. Lower right row index Lower right column index object index. Adds a chart to the collection. Chart type Specifies the data range of the chart Upper left row index. Upper left column index. Lower right row index Lower right column index object index. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 12 months later since May 2022. Aspose apologizes for any inconvenience you may have experienced. Adds a chart with preset template. The data of chart template file(.crtx). Specifies the data range of the chart Specifies whether to plot the series from a range of cell values by row or by column. Upper left row index. Upper left column index. Lower right row index Lower right column index object index. Adds a chart to the collection. Chart type Specifies the data range of the chart Specifies whether to plot the series from a range of cell values by row or by column. Upper left row index. Upper left column index. Lower right row index Lower right column index object index. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Gets the chart by the name. The chart name. The chart. The default chart name is null. So you have to explicitly set the name of the chart. Remove a chart at the specific index. The chart index. Clear all charts. Represents a chart data table. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the first worksheet Worksheet worksheet = workbook.Worksheets[0]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(60); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(32); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 25, 10); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", true); chart.ShowDataTable = true; //Getting Chart Table ChartDataTable chartTable = chart.ChartDataTable; //Setting Chart Table Font Color chartTable.Font.Color = System.Drawing.Color.Red; //Setting Legend Key VisibilityOptions chartTable.ShowLegendKey = false; //Saving the Excel file workbook.Save("book1.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the first worksheet Dim worksheet As Worksheet = workbook.Worksheets(0) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(60) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(32) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a chart to the worksheet Dim chartIndex As Integer = worksheet.Charts.Add(ChartType.Column, 5, 0, 25, 10) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", True) chart.ShowDataTable = True 'Getting Chart Table Dim chartTable As ChartDataTable = chart.ChartDataTable 'Setting Chart Table Font Color chartTable.Font.Color = System.Drawing.Color.Red 'Setting Legend Key VisibilityOptions chartTable.ShowLegendKey = False 'Saving the Excel file workbook.Save("book1.xls") Gets a object which represents the font setting of the specified chart data table. True if the text in the object changes font size when the object size changes. The default value is True. Gets and sets the display mode of the background True if the chart data table has horizontal cell borders NOTE: This property is now obsolete. Instead, please use ChartDataTable.HasHorizontalBorder property. This property will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced. True if the chart data table has horizontal cell borders True if the chart data table has vertical cell borders NOTE: This property is now obsolete. Instead, please use ChartDataTable.HasVerticalBorder property. This property will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced. True if the chart data table has vertical cell borders True if the chart data table has outline borders NOTE: This property is now obsolete. Instead, please use ChartDataTable.HasOutlineBorder property. This property will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced. True if the chart data table has outline borders True if the data label legend key is visible. Returns a Border object that represents the border of the object Encapsulates the object that represents the frame object in a chart. Indicates whether the size of the plot area size includes the tick marks, and the axis labels. False specifies that the size shall determine the size of the plot area, the tick marks, and the axis labels. Only for Xlsx file. Gets the border. Gets the area. Gets a object of the specified ChartFrame object. NOTE: This member is now obsolete. Instead, please use ChartFrame.Font property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the options of the text. Gets a object of the specified ChartFrame object. True if the text in the object changes font size when the object size changes. The default value is True. Gets and sets the display mode of the background Gets and sets the display mode of the background NOTE: This member is now obsolete. Instead, please use ChartFrame.BackgroundMode property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced. Indicates whether the chart frame is automatic sized. Gets or sets the x coordinate of the upper left corner in units of 1/4000 of the chart area. How to convert units of 1/4000 to pixels? X In Pixels = X * Chart.ChartObject.Width / 4000d; NOTE: This member is now obsolete. Please use ChartFrame.XRatioToChart property, instead. X = XRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Gets or sets the y coordinate of the upper left corner in units of 1/4000 of the chart area. How to convert units of 1/4000 to pixels? Y In Pixels = Y * Chart.ChartObject.Height / 4000d; NOTE: This member is now obsolete. Please use ChartFrame.YRatioToChart property, instead. Y = YRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Gets or sets the height of frame in units of 1/4000 of the chart area. How to convert units of 1/4000 to pixels? Height In Pixels = Y * Chart.ChartObject.Height / 4000d; NOTE: This member is now obsolete. Please use ChartFrame.HeightRatioToChart property, instead. Height = HeightRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Gets or sets the width of frame in units of 1/4000 of the chart area. How to convert units of 1/4000 to pixels? Width In Pixels = Width * Chart.ChartObject.Height / 4000d; NOTE: This member is now obsolete. Please use ChartFrame.WidthRatioToChart property, instead. Width = WidthRatioToChart * 4000; This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. True if the frame has a shadow. Gets the object. Indicates whether default position(DefaultX, DefaultY, DefaultWidth and DefaultHeight) are set. Represents x of default position in units of 1/4000 of the chart area. NOTE: This member is now obsolete. Please use ChartFrame.DefaultXRatioToChart property, instead. DefaultX = (int)(DefaultXRatioToChart * 4000); This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Represents y of default position in units of 1/4000 of the chart area. NOTE: This member is now obsolete. Please use ChartFrame.DefaultYRatioToChart property, instead. DefaultY = (int)(DefaultYRatioToChart * 4000); This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Represents width of default position in units of 1/4000 of the chart area. NOTE: This member is now obsolete. Please use ChartFrame.DefaultWidthRatioToChart property, instead. DefaultWidth = (int)(DefaultWidthRatioToChart * 4000); This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Represents height of default position in units of 1/4000 of the chart area. NOTE: This member is now obsolete. Please use ChartFrame.DefaultHeightRatioToChart property, instead. DefaultHeight = (int)(DefaultHeightRatioToChart * 4000); This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Represents x of default position in units of Fraction of the chart area. Represents y of default position in units of Fraction of the chart area. Represents width of default position in units of Fraction of the chart area. Represents height of default position in units of Fraction of the chart area. Gets or sets the x coordinate of the upper left corner in units of ratio of the chart area. This is a fraction value, its valid range is between 0-1. How to convert units of ratio to pixels? XPixel = XRatioToChart * Chart.ChartObject.Width; Gets or sets the y coordinate of the upper left corner in units of ratio of the chart area. This is a fraction value, its valid range is between 0-1. How to convert units of ratio to pixels? YPixel = YRatioToChart * Chart.ChartObject.Height; Gets or sets the width of frame in units of ratio of the chart area. This is a fraction value, its valid range is between 0-1. How to convert units of ratio to pixels? WidthPixel = WidthRatioToChart * Chart.ChartObject.Width; Gets or sets the height of frame in units of ratio of the chart area. This is a fraction value, its valid range is between 0-1. How to convert units of ratio to pixels? HeightPixel = HeightRatioToChart * Chart.ChartObject.Height; Gets or sets the x coordinate of the upper left corner in units of Pixel. Gets or sets the y coordinate of the upper left corner in units of Pixel. Gets or sets the width of frame in units of Pixel. Gets or sets the height of frame in units of Pixel. Set position of the frame to automatic Represents the globalization settings for chart. Gets the name of Series in the Chart. Gets the name of Chart Title. Gets the name of increase for Legend. Gets the name of Decrease for Legend. Gets the name of Total for Legend. Gets the name of Title for Axis. Gets the name of "Other" labels for Chart. Gets the Name of Axis Unit. Represents line format type of chart line. Represents automatic formatting type. Represents solid formatting type. Represents none formatting type. Gradient Represents the marker style in a line chart, scatter chart, or radar chart. Automatic markers. Circular markers. Long bar markers Diamond-shaped markers. Short bar markers. No markers. Square markers with a plus sign. Square markers. Square markers with an asterisk. Triangular markers. Square markers with an X. Picture Represents a single point in a series in a chart. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the first worksheet Worksheet worksheet = workbook.Worksheets[0]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(60); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(32); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.PieExploded, 5, 0, 25, 10); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", true); //Show Data Labels chart.NSeries[0].DataLabels.ShowValue = true; for (int i = 0; i < chart.NSeries[0].Points.Count; i++) { //Get Data Point ChartPoint point = chart.NSeries[0].Points[i]; //Set Pir Explosion point.Explosion = 15; //Set Border Color point.Border.Color = System.Drawing.Color.Red; } //Saving the Excel file workbook.Save("book1.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the first worksheet Dim worksheet As Worksheet = workbook.Worksheets(0) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(60) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(32) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a chart to the worksheet Dim chartIndex As Integer = worksheet.Charts.Add(ChartType.PieExploded, 5, 0, 25, 10) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", True) 'Show Data Labels chart.NSeries(0).DataLabels.IsValueShown = True For i As Integer = 0 To chart.NSeries(0).Points.Count - 1 'Get Data Point Dim point As ChartPoint = chart.NSeries(0).Points(i) 'Set Pir Explosion point.Explosion = 15 'Set Border Color point.Border.Color = System.Drawing.Color.Red Next i 'Saving the Excel file workbook.Save("book1.xls") The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter. True if the chartpoint has a shadow. Gets the border. Gets the area. Gets the marker. Returns a object that represents the data label associated with this chart point. Gets or sets the Y value of the chart point. Gets Y value type of the chart point. Gets or sets the X value of the chart point. Gets X value type of the chart point. Gets the object that holds the visual shape properties of the ChartPoint. Gets or sets a value indicates whether this data points is in the second pie or bar on a pie of pie or bar of pie chart Gets the x coordinate of the upper left corner in units of 1/4000 of chart's width after calls Chart.Calculate() method. Gets the y coordinate of the upper left corner in units of 1/4000 of chart's height after calls Chart.Calculate() method. Gets the width in units of 1/4000 of chart's width after calls Chart.Calculate() method. Gets the height in units of 1/4000 of chart's height after calls Chart.Calculate() method. Gets the x coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method. Gets the y coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method. Gets the width in units of pixels after calls Chart.Calculate() method. Gets the height in units of pixels after calls Chart.Calculate() method. Gets the width of border in units of pixels after calls Chart.Calculate() method. Gets the radius of bubble, pie or doughnut in units of pixels after calls Chart.Calculate() method. Gets the inner radius of doughnut slice in units of pixels after calls Chart.Calculate() method. Applies to Doughnut chart. Gets the inner radius of doughnut slice in units of pixels after calls Chart.Calculate() method. Applies to Doughnut chart. NOTE: This property is now obsolete. Instead, please use ChartPoint.DoughnutInnerRadius property. This property will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the starting angle for the pie section, measured in degrees clockwise from the x-axis after calls Chart.Calculate() method. Applies to Pie chart. Gets the ending angle for the pie section, measured in degrees clockwise from the x-axis after calls Chart.Calculate() method. Applies to Pie chart. Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart. Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart. Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart. Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart. Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart. Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart. Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart. Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart. Gets the number of top points after calls Chart.Calculate() method. Gets x-coordinate of the top point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid and Area3D Gets y-coordinate of the top point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid and Area3D Gets the number of bottom points after calls Chart.Calculate() method. Gets x-coordinate of the bottom point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid Gets y-coordinate of the bottom point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid Gets the number of the points on category axis after calls Chart.Calculate() method. Only applies to area chart. Area 2D chart return 1 Area 3D chart return 2. Gets x-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart. Area 2D chart: index is 0. Area 3D chart: index is 0 or 1. Gets y-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart. Area 2D chart: index is 0. Area 3D chart: index is 0 or 1. Represents a collection that contains all the points in one series. //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the first worksheet Worksheet worksheet = workbook.Worksheets[0]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(60); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(32); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.PieExploded, 5, 0, 25, 10); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", true); //Show Data Labels chart.NSeries[0].DataLabels.ShowValue = true; ChartPointCollection points = chart.NSeries[0].Points; for (int i = 0; i < points.Count; i++) { //Get Data Point ChartPoint point = points[i]; //Set Pir Explosion point.Explosion = 15; //Set Border Color point.Border.Color = System.Drawing.Color.Red; } //Saving the Excel file workbook.Save("book1.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the first worksheet Dim worksheet As Worksheet = workbook.Worksheets(0) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(60) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(32) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a chart to the worksheet Dim chartIndex As Integer = worksheet.Charts.Add(ChartType.PieExploded, 5, 0, 25, 10) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", True) 'Show Data Labels chart.NSeries(0).DataLabels.ShowValue = True Dim points As ChartPointCollection = chart.NSeries(0).Points For i As Integer = 0 To points.Count - 1 'Get Data Point Dim point As ChartPoint = points(i) 'Set Pir Explosion point.Explosion = 15 'Set Border Color point.Border.Color = System.Drawing.Color.Red Next i 'Saving the Excel file workbook.Save("book1.xls") Returns an enumerator for the entire . Remove all setting of the chart points. Removes point at the index of the series.. The index of the point. Gets the count of the chart point. Gets the element at the specified index in the series. The index of chart point in the series. The ChartPoint object. Represents the way the two sections of either a pie of pie chart or a bar of pie chart are split. Represents the data points shall be split between the pie and the second chart by putting the last Split Position of the data points in the second chart Represents the data points shall be split between the pie and the second chart by putting the data points with value less than Split Position in the second chart. Represents the data points shall be split between the pie and the second chart by putting the points with percentage less than Split Position percent in the second chart. Represents the data points shall be split between the pie and the second chart according to the Custom Split values. Represents the data points shall be split using the default mechanism for this chart type. NOTE: This member is now obsolete. Instead, please use Series.IsAutoSplit property. This property will be removed 12 months later since September 2023. Aspose apologizes for any inconvenience you may have experienced. Represents the text direction type of the chart. Horizontal direction type. Vertical direction type. Rotate 90 angle. Rotate 270 angle. Stacked text. Encapsulates the object that represents the frame object which contains text. Indicates the text is auto generated. Indicates whether this data labels is deleted. Gets and sets the text horizontal alignment. Gets or sets the text vertical alignment of text. Represents text rotation angle.
0: Not rotated.

255: Top to Bottom.

-90: Downward.

90: Upward.
Indicates whether the text of the chart is automatically rotated. Returns a Characters object that represents a range of characters within the text. The index of the start of the character. The number of characters. Characters object. Gets or sets the text of a frame's title. Gets and sets a reference to the worksheet. Represents text reading order. NOTE: This member is now obsolete. Instead, please use ChartTextFrame.ReadingOrder property. This property will be removed 12 months later since March 2020. Aspose apologizes for any inconvenience you may have experienced. Represents text reading order. Gets and sets the direction of text. Gets or sets a value indicating whether the text is wrapped. Gets or sets whether a shape should be auto-fit to fully contain the text described within it. Auto-fitting is when text within a shape is scaled in order to contain all the text inside. Enumerates all chart types used in Excel. Represents Area Chart. Represents Stacked Area Chart. Represents 100% Stacked Area Chart. Represents 3D Area Chart. Represents 3D Stacked Area Chart. Represents 3D 100% Stacked Area Chart. Represents Bar Chart: Clustered Bar Chart. Represents Stacked Bar Chart. Represents 100% Stacked Bar Chart. Represents 3D Clustered Bar Chart. Represents 3D Stacked Bar Chart. Represents 3D 100% Stacked Bar Chart. Represents Bubble Chart. Represents 3D Bubble Chart. Represents Column Chart: Clustered Column Chart. Represents Stacked Column Chart. Represents 100% Stacked Column Chart. Represents 3D Column Chart. Represents 3D Clustered Column Chart. Represents 3D Stacked Column Chart. Represents 3D 100% Stacked Column Chart. Represents Cone Chart. Represents Stacked Cone Chart. Represents 100% Stacked Cone Chart. Represents Conical Bar Chart. Represents Stacked Conical Bar Chart. Represents 100% Stacked Conical Bar Chart. Represents 3D Conical Column Chart. Represents Cylinder Chart. Represents Stacked Cylinder Chart. Represents 100% Stacked Cylinder Chart. Represents Cylindrical Bar Chart. Represents Stacked Cylindrical Bar Chart. Represents 100% Stacked Cylindrical Bar Chart. Represents 3D Cylindrical Column Chart. Represents Doughnut Chart. Represents Exploded Doughnut Chart. Represents Line Chart. Represents Stacked Line Chart. Represents 100% Stacked Line Chart. Represents Line Chart with data markers. Represents Stacked Line Chart with data markers. Represents 100% Stacked Line Chart with data markers. Represents 3D Line Chart. Represents Pie Chart. Represents 3D Pie Chart. Represents Pie of Pie Chart. Represents Exploded Pie Chart. Represents 3D Exploded Pie Chart. Represents Bar of Pie Chart. Represents Pyramid Chart. Represents Stacked Pyramid Chart. Represents 100% Stacked Pyramid Chart. Represents Pyramid Bar Chart. Represents Stacked Pyramid Bar Chart. Represents 100% Stacked Pyramid Bar Chart. Represents 3D Pyramid Column Chart. Represents Radar Chart. Represents Radar Chart with data markers. Represents Filled Radar Chart. Represents Scatter Chart. Represents Scatter Chart connected by curves, with data markers. Represents Scatter Chart connected by curves, without data markers. Represents Scatter Chart connected by lines, with data markers. Represents Scatter Chart connected by lines, without data markers. Represents High-Low-Close Stock Chart. Represents Open-High-Low-Close Stock Chart. Represents Volume-High-Low-Close Stock Chart. Represents Volume-Open-High-Low-Close Stock Chart. Represents Surface Chart: 3D Surface Chart. Represents Wireframe 3D Surface Chart. Represents Contour Chart. Represents Wireframe Contour Chart. The series is laid out as box and whisker. The series is laid out as a funnel. The series is laid out as pareto lines. The series is laid out as a sunburst. The series is laid out as a treemap. The series is laid out as a waterfall. The series is laid out as a histogram. The series is laid out as a region map. The series is laid out as a radial historgram. It is used only for rendering Represents the axis cross type. Microsoft Excel sets the axis crossing point. The axis crosses at the maximum value. The axis crosses at the minimum value. The axis crosses at the custom value. Encapsulates a collection of all the DataLabel objects for the specified Series. [C#] //Set the DataLabels in the chart Workbook wb = new Workbook("chart.xlsx"); Chart chart = wb.Worksheets[0].Charts[0]; DataLabels datalabels; for (int i = 0; i <chart.NSeries.Count; i++) { datalabels = chart.NSeries[i].DataLabels; //Set the position of DataLabels datalabels.Position = LabelPositionType.InsideBase; //Show the category name in the DataLabels datalabels.ShowCategoryName = true; //Show the value in the DataLabels datalabels.ShowValue = true; //Not show the percentage in the DataLabels datalabels.ShowPercentage = false; //Not show the legend key. datalabels.ShowLegendKey = false; } [Visual Basic] 'Set the DataLabels in the chart Dim datalabels As DataLabels Dim i As Integer For i = 0 To chart.NSeries.Count - 1 Step 1 datalabels = chart.NSeries(i).DataLabels 'Set the position of DataLabels datalabels.Position = LabelPositionType.InsideBase 'Show the category name in the DataLabels datalabels.ShowCategoryName= True 'Show the value in the DataLabels datalabels.ShowValue = True 'Not show the percentage in the DataLabels datalabels.ShowPercentage = False 'Not show the legend key. datalabels.ShowLegendKey = False Next Gets the border. Gets the area. Indicates the text is auto generated. Gets and sets the direction of text. Gets or sets the text of data label. Gets or sets a value indicating whether the text is wrapped. Gets and sets the display mode of the background Represents a specified chart's data label values display behavior. True displays the values. False to hide. Indicates whether showing cell range as the data labels. Represents a specified chart's data label percentage value display behavior. True displays the percentage value. False to hide. Represents a specified chart's data label percentage value display behavior. True displays the percentage value. False to hide. Represents a specified chart's data label category name display behavior.True to display the category name for the data labels on a chart. False to hide. Indicates whether the series name displays for the data labels on a chart. True to show the series name. False to hide. Represents a specified chart's data label legend key display behavior. True if the data label legend key is visible. Represents the format string for the DataLabels object. Gets and sets the built-in number format. True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). Apply the font of the datalabels to all child nodes. Gets the font of the DataLabels; Gets or sets the separator type used for the data labels on a chart. To set custom separator, please set the property as and then specify the expected value for . Gets or sets the separator value used for the data labels on a chart. Represents the position of the data label. Indicates whether the datalabels display never overlap. (For Pie chart) Gets or sets shape type of data label. Represents the separator type of DataLabels. Represents automatic separator Represents space(" ") Represents comma(",") Represents semicolon(";") Represents period(".") Represents newline("\n") Represents custom separator Represents the display unit label. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Excel object int sheetIndex = workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[sheetIndex]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "A4" cell worksheet.Cells["A4"].PutValue(200); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(60); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(32); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a sample value to "B4" cell worksheet.Cells["B4"].PutValue(40); //Adding a sample value to "C1" cell as category data worksheet.Cells["C1"].PutValue("Q1"); //Adding a sample value to "C2" cell as category data worksheet.Cells["C2"].PutValue("Q2"); //Adding a sample value to "C3" cell as category data worksheet.Cells["C3"].PutValue("Y1"); //Adding a sample value to "C4" cell as category data worksheet.Cells["C4"].PutValue("Y2"); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4" chart.NSeries.Add("A1:B4", true); //Setting the data source for the category data of NSeries chart.NSeries.CategoryData = "C1:C4"; //Setting the display unit of value(Y) axis. chart.ValueAxis.DisplayUnit = DisplayUnitType.Hundreds; DisplayUnitLabel displayUnitLabel = chart.ValueAxis.DisplayUnitLabel; //Setting the custom display unit label displayUnitLabel.Text = "100"; //Saving the Excel file workbook.Save("book1.xls"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Excel object Dim sheetIndex As Int32 = workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "A4" cell worksheet.Cells("A4").PutValue(200) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(60) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(32) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a sample value to "B4" cell worksheet.Cells("B4").PutValue(40) 'Adding a sample value to "C1" cell as category data worksheet.Cells("C1").PutValue("Q1") 'Adding a sample value to "C2" cell as category data worksheet.Cells("C2").PutValue("Q2") 'Adding a sample value to "C3" cell as category data worksheet.Cells("C3").PutValue("Y1") 'Adding a sample value to "C4" cell as category data worksheet.Cells("C4").PutValue("Y2") 'Adding a chart to the worksheet Dim chartIndex As Int32 = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4" chart.NSeries.Add("A1:B4", True) 'Setting the data source for the category data of NSeries Chart.NSeries.CategoryData = "C1:C4" 'Setting the display unit of value(Y) axis. chart.ValueAxis.DisplayUnit = DisplayUnitType.Hundreds Dim displayUnitLabel As DisplayUnitLabel = chart.ValueAxis.DisplayUnitLabel 'Setting the custom display unit label displayUnitLabel.Text = "100" 'Saving the Excel file workbook.Save("book1.xls") Gets or sets the text of display unit label. Gets a object of the specified ChartFrame object. True if the text in the object changes font size when the object size changes. The default value is True. Represents the type of display unit of chart's axis. Display unit is None. Specifies the values on the chart shall be divided by 100. Specifies the values on the chart shall be divided by 1,000. Specifies the values on the chart shall be divided by 10,000. Specifies the values on the chart shall be divided by 100,000. Specifies the values on the chart shall be divided by 1,000,000. Specifies the values on the chart shall be divided by 10,000,000. Specifies the values on the chart shall be divided by 100,000,000. Specifies the values on the chart shall be divided by 1,000,000,000. Specifies the values on the chart shall be divided by 1,000,000,000,000. The values on the chart shall be divided by 0.01. specifies a custom value for the display unit. NOTE: This member is now obsolete. Instead, please use DisplayUnitType.Custom. This property will be removed 12 months later since January 2023. Aspose apologizes for any inconvenience you may have experienced. specifies a custom value for the display unit. Represents the up/down bars in a chart. Gets the border . Gets the . Represents error bar of data series. [C#] Workbook workbook = new Workbook(); Cells cells = workbook.Worksheets[0].Cells; cells["a1"].PutValue(2); cells["a2"].PutValue(5); cells["a3"].PutValue(3); cells["a4"].PutValue(6); cells["b1"].PutValue(4); cells["b2"].PutValue(3); cells["b3"].PutValue(6); cells["b4"].PutValue(7); cells["C1"].PutValue("Q1"); cells["C2"].PutValue("Q2"); cells["C3"].PutValue("Y1"); cells["C4"].PutValue("Y2"); int chartIndex = workbook.Worksheets[0].Charts.Add(ChartType.Column, 11, 0, 27, 10); Chart chart = workbook.Worksheets[0].Charts[chartIndex]; chart.NSeries.Add("A1:B4", true); chart.NSeries.CategoryData = "C1:C4"; for(int i = 0; i < chart.NSeries.Count; i ++) { Series aseries = chart.NSeries[i]; aseries.YErrorBar.DisplayType = ErrorBarDisplayType.Minus; aseries.YErrorBar.Type = ErrorBarType.FixedValue; aseries.YErrorBar.Amount = 5; } [Visual Basic] Dim workbook As Workbook = New Workbook() Dim cells As Cells = workbook.Worksheets(0).Cells cells("a1").PutValue(2) cells("a2").PutValue(5) cells("a3").PutValue(3) cells("a4").PutValue(6) cells("b1").PutValue(4) cells("b2").PutValue(3) cells("b3").PutValue(6) cells("b4").PutValue(7) cells("C1").PutValue("Q1") cells("C2").PutValue("Q2") cells("C3").PutValue("Y1") cells("C4").PutValue("Y2") Dim chartIndex As Integer = workbook.Worksheets(0).Charts.Add(ChartType.Column,11,0,27,10) Dim chart As Chart = workbook.Worksheets(0).Charts(chartIndex) chart.NSeries.Add("A1:B4", True) chart.NSeries.CategoryData = "C1:C4" Dim i As Integer For i = 0 To chart.NSeries.Count - 1 Dim aseries As ASeries = chart.NSeries(i) aseries.YErrorBar.DisplayType = ErrorBarDisplayType.Minus aseries.YErrorBar.Type = ErrorBarType.FixedValue aseries.YErrorBar.Amount = 5 Next Represents error bar amount type. [C#] Workbook wb = new Workbook("chart.xlsx"); Chart chart = wb.Worksheets[0].Charts[0]; Series aseries = chart.NSeries[0]; //Sets custom error bar type aseries.YErrorBar.Type = ErrorBarType.Custom; aseries.YErrorBar.PlusValue = "=Sheet1!A1"; aseries.YErrorBar.MinusValue = "=Sheet1!A2"; [Visual Basic] 'Sets custom error bar type aseries.YErrorBar.Type = ErrorBarType.Custom aseries.YErrorBar.PlusValue = "=Sheet1!A1" aseries.YErrorBar.MinusValue = "=Sheet1!A2" Represents the display type of error bar. Represents amount of error bar. The amount must be greater than or equal to zero. Indicates if formatting error bars with a T-top. Represents positive error amount when error bar type is Custom. Represents negative error amount when error bar type is Custom. Represents error bar display type. Both Minus None Plus Represents error bar amount type. InnerCustom value type. Fixed value type. Percentage type Standard deviation type. Standard error type. Encapsulates the object that represents the floor of a 3-D chart. [C#] //Instantiate the License class Aspose.Cells.License license = new Aspose.Cells.License(); //Pass only the name of the license file embedded in the assembly license.SetLicense("Aspose.Cells.lic"); //Instantiate the workbook object Workbook workbook = new Workbook(); //Get cells collection Cells cells = workbook.Worksheets[0].Cells; //Put values in cells cells["A1"].PutValue(1); cells["A2"].PutValue(2); cells["A3"].PutValue(3); //get charts colletion ChartCollection charts = workbook.Worksheets[0].Charts; //add a new chart int index = charts.Add(ChartType.Column3DStacked, 5, 0, 15, 5); //get the newly added chart Chart chart = charts[index]; //set charts nseries chart.NSeries.Add("A1:A3", true); //Show data labels chart.NSeries[0].DataLabels.ShowValue = true; //Get chart's floor Floor floor = chart.Floor; //set floor's border as red floor.Border.Color = System.Drawing.Color.Red; //set fill format floor.FillFormat.SetPresetColorGradient(GradientPresetType.CalmWater, GradientStyleType.DiagonalDown, 2); //save the file workbook.Save(@"dest.xls"); [VB.NET] 'Instantiate the License class Dim license As New Aspose.Cells.License() 'Pass only the name of the license file embedded in the assembly license.SetLicense("Aspose.Cells.lic") 'Instantiate the workbook object Dim workbook As Workbook = New Workbook() 'Get cells collection Dim cells As Cells = workbook.Worksheets(0).Cells 'Put values in cells cells("A1").PutValue(1) cells("A2").PutValue(2) cells("A3").PutValue(3) 'get charts colletion Dim charts As ChartCollection = workbook.Worksheets(0).Charts 'add a new chart Dim index As Integer = charts.Add(ChartType.Column3DStacked, 5, 0, 15, 5) 'get the newly added chart Dim chart As Chart = charts(index) 'set charts nseries chart.NSeries.Add("A1:A3", True) 'Show data labels chart.NSeries(0).DataLabels.ShowValue = True 'Get chart's floor Dim floor As Floor = chart.Floor 'set floor's border as red floor.Border.Color = System.Drawing.Color.Red 'set fill format floor.FillFormat.SetPresetColorGradient(GradientPresetType.CalmWater, GradientStyleType.DiagonalDown, 2) 'save the file workbook.Save("dest.xls") Gets or sets the border . Represents the type of formatting applied to an object or a object. Represents automatic formatting type. Represents custom formatting type. Represents none formatting type. Represents data label position type. Applies only to bar, 2d/3d pie charts Applies only to bar, 2d/3d pie charts Applies only to bar charts Applies only to bar, 2d/3d pie charts Applies only to line charts Applies only to line charts Applies only to line charts Applies only to line charts Applies only to 2d/3d pie charts User moved the data labels, Only for reading chart from template file. Encapsulates the object that represents the chart legend. [C#] Workbook workbook = new Workbook(); Worksheet sheet = workbook.Worksheets[0]; Cells cells = sheet.Cells; cells[0,1].PutValue("Income"); cells[1,0].PutValue("Company A"); cells[2,0].PutValue("Company B"); cells[3,0].PutValue("Company C"); cells[1,1].PutValue(10000); cells[2,1].PutValue(20000); cells[3,1].PutValue(30000); int chartIndex = sheet.Charts.Add(ChartType.Column, 9, 9, 21, 15); Chart chart = sheet.Charts[chartIndex]; chart.SetChartDataRange("A1:B4", true); //Set Legend's width and height Legend legend = chart.Legend; //Legend is at right side of chart by default. //If the legend is at left or right side of the chart, setting Legend.X property will not take effect. //If the legend is at top or bottom side of the chart, setting Legend.Y property will not take effect. legend.Y = 1500; legend.Width = 50; legend.Height = 50; //Set legend's position legend.Position = LegendPositionType.Left; [Visual Basic] Dim workbook as Workbook = new Workbook() Dim sheet as Worksheet = workbook.Worksheets(0) Dim cells as Cells = sheet.Cells cells(0,1).PutValue("Income") cells(1,0).PutValue("Company A") cells(2,0).PutValue("Company B") cells(3,0).PutValue("Company C") cells(1,1).PutValue(10000) cells(2,1).PutValue(20000) cells(3,1).PutValue(30000) Dim chartIndex as Integer = sheet.Charts.Add(ChartType.Column, 9, 9, 21, 15) Dim chart as Chart = sheet.Charts(chartIndex) chart.SetChartDataRange("A1:B4", True); 'Set Legend's width and height Dim legend as Legend = chart.Legend 'Legend is at right side of chart by default. 'If the legend is at left or right side of the chart, setting Legend.X property will not take effect. 'If the legend is at top or bottom side of the chart, setting Legend.Y property will not take effect. legend.Y = 1500 legend.Width = 50 legend.Height = 50 'Set legend's position legend.Position = LegendPositionType.Left Gets or sets the legend position type.
Default position is right.

If the legend is at left or right side of the chart, setting Legend.X property will not take effect.

If the legend is at top or bottom side of the chart, setting Legend.Y property will not take effect.
Gets a collection of all the LegendEntry objects in the specified chart legend. Setting the legend entries of the surface chart is not supported. So it will return null if the chart type is surface chart type. Gets the labels of the legend entries after call Chart.Calculate() method. Gets the labels of the legend entries after call Chart.Calculate() method. NOTE: This member is now obsolete. Instead, please use Legend.GetLegendLabels method. This property will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced. Gets or sets whether showing the legend without overlapping the chart. Represents a legend entry in a chart legend. Gets and sets whether the legend entry is deleted. Gets a object of the specified ChartFrame object. Gets a object of the specified LegendEntry object. NOTE: This member is now obsolete. Instead, please use LegendEntry.Font property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced. Gets or sets no fill of the text. True if the text in the object changes font size when the object size changes. The default value is True. Gets and sets the display mode of the background NOTE: This member is now obsolete. Instead, please use LegendEntry.BackgroundMode property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the display mode of the background Represents a collection of all the objects in the specified chart legend. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Enumerates the legend position types. Displays the legend to the bottom of the chart's plot area. Displays the legend to the corner of the chart's plot area. Displays the legend to the left of the chart's plot area. Represents that the legend is not docked. Displays the legend to the right of the chart's plot area. Displays the legend to the top of the chart's plot area. Represents the layout of map chart's labels. Only best fit. Shows all labels. No labels. Represents projection type of the map chart. Automatic Mercator Miller Albers Represents the region type of the map chart. Automatic Only Data. Country region list. World. Represents the marker in a line chart, scatter chart, or radar chart. Gets the border. Gets the area. Represents the marker style. Applies to line chart, scatter chart, or radar chart. Represents the marker size in unit of points. Applies to line chart, scatter chart, or radar chart. Represents the marker size in unit of pixels. Applies to line chart, scatter chart, or radar chart. Represents the marker foreground color in a line chart, scatter chart, or radar chart. Gets or sets the marker foreground color set type. Represents the marker background color in a line chart, scatter chart, or radar chart. Gets or sets the marker background color set type. Represents a complex type that specifies the pivot controls that appear on the chart Specifies whether a control for each PivotTable field on the PivotTable page axis of the source PivotTable appears on the chart when dropZonesVisible is set to true. Specifies whether a control for each PivotTable field on the PivotTable row axis of the source PivotTable appears on the chart when dropZonesVisible is set to true. Specifies whether a control for each PivotTable field on the PivotTable data axis of the source PivotTable appears on the chart when dropZonesVisible is set to true. Specifies whether a control for each PivotTable field on the PivotTable column axis of the source PivotTable appears on the chart when dropZonesVisible is set to true. Specifies whether any pivot controls can appear on the pivot chart. Encapsulates the object that represents the plot area in a chart. Gets or gets the x coordinate of the upper left corner of plot-area bounding box in units of 1/4000 of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The X, Y, Width and Height of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

NOTE: This member is now obsolete. Please use PlotArea.XRatioToChart property, instead. X = XRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced.
Gets or gets the y coordinate of the upper top corner of plot-area bounding box in units of 1/4000 of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The X, Y, Width and Height of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

NOTE: This member is now obsolete. Please use PlotArea.YRatioToChart property, instead. Y = YRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced.
Gets or sets the height of plot-area bounding box in units of 1/4000 of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The X, Y, Width and Height of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

NOTE: This member is now obsolete. Please use PlotArea.HeightRatioToChart property, instead. Height = HeightRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced.
Gets or sets the width of plot-area bounding box in units of 1/4000 of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The X, Y, Width and Height of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

NOTE: This member is now obsolete. Please use PlotArea.WidthRatioToChart property, instead. Width = WidthRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced.
Gets or gets the x coordinate of the upper top corner of plot area in units of 1/4000 of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The X, Y, Width and Height of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

NOTE: This member is now obsolete. Please use PlotArea.InnerXRatioToChart property, instead. InnerX = InnerXRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced.
Gets or gets the x coordinate of the upper top corner of plot area in units of 1/4000 of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The X, Y, Width and Height of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

NOTE: This member is now obsolete. Please use PlotArea.InnerYRatioToChart property, instead. InnerY = InnerYRatioToChart * 4000. This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced.
Gets or sets the height of plot area in units of 1/4000 of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The X, Y, Width and Height of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

NOTE: This member is now obsolete. Please use PlotArea.InnerHeightRatioToChart property, instead. InnerHeight = InnerHeightRatioToChart * 4000; This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced.
Gets or sets the width of plot area in units of 1/4000 of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The X, Y, Width and Height of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

NOTE: This member is now obsolete. Please use PlotArea.InnerWidthRatioToChart property, instead. InnerWidth = InnerWidthRatioToChart * 4000; This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced.
Gets or gets the x coordinate of the upper left corner of plot-area bounding box in units of ratio of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The XRatioToChart, YRatioToChart, WidthRatioToChart and HeightRatioToChart of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

XPixel = XRatioToChart * chart.ChartObject.Width.
Gets or gets the y coordinate of the upper top corner of plot-area bounding box in units of ratio of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The XRatioToChart, YRatioToChart, WidthRatioToChart and HeightRatioToChart of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

YPixel = YRatioToChart * chart.ChartObject.Width.
Gets or sets the height of plot-area bounding box in units of ratio of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The XRatioToChart, YRatioToChart, WidthRatioToChart and HeightRatioToChart of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

HeightPixel = HeightRatioToChart * chart.ChartObject.Width.
Gets or sets the width of plot-area bounding box in units of ratio of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The XRatioToChart, YRatioToChart, WidthRatioToChart and HeightRatioToChart of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

WidthPixel = WidthRatioToChart * chart.ChartObject.Width.
Gets or gets the x coordinate of the upper top corner of plot area in units of ratio of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The XRatioToChart, YRatioToChart, WidthRatioToChart and HeightRatioToChart of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

InnerX in Pixel = InnerXRatioToChart * chart.ChartObject.Width.
Gets or gets the x coordinate of the upper top corner of plot area in units of ratio of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The XRatioToChart, YRatioToChart, WidthRatioToChart and HeightRatioToChart of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

InnerY in Pixel = InnerYRatioToChart * chart.ChartObject.Width.
Gets or sets the height of plot area in units of ratio of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The XRatioToChart, YRatioToChart, WidthRatioToChart and HeightRatioToChart of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

InnerHeight in Pixel = InnerXRatioToChart * chart.ChartObject.Width.
Gets or sets the width of plot area in units of ratio of the chart area.

The plot-area bounding box includes the plot area, tick marks(tick labels), and a small border around the tick marks. If the value is not created by MS Excel, please call Chart.Calculate() method before calling this method.

The XRatioToChart, YRatioToChart, WidthRatioToChart and HeightRatioToChart of PlotArea represents the plot-area bounding box that includes the plot area, tick marks(tick labels), and a small border around the tick marks. If you want to get actual size of plot area, you should call InnerXRatioToChart, InnerYRatioToChart, InnerWidthRatioToChart and InnerHeightRatioToChart properties.

For excel 2007 or latter, the default value is zero. you should call get the value after calling Chart.Calculate().

InnerWidth in Pixel = InnerXRatioToChart * chart.ChartObject.Width.
Set position of the plot area to automatic Indicates whether the plot area is automatic sized. Represents the type of data plot by row or column. By row. By column. Represents all plot empty cells type of a chart. Not plotted(leave gap) Zero Interpolated Represents quartile calculation methods. The quartile calculation includes the median when splitting the dataset into quartiles. The quartile calculation excludes the median when splitting the dataset into quartiles. Encapsulates the object that represents a single data series in a chart. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Excel object int sheetIndex = workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[sheetIndex]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "A4" cell worksheet.Cells["A4"].PutValue(200); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(60); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(32); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a sample value to "B4" cell worksheet.Cells["B4"].PutValue(40); //Adding a sample value to "C1" cell as category data worksheet.Cells["C1"].PutValue("Q1"); //Adding a sample value to "C2" cell as category data worksheet.Cells["C2"].PutValue("Q2"); //Adding a sample value to "C3" cell as category data worksheet.Cells["C3"].PutValue("Y1"); //Adding a sample value to "C4" cell as category data worksheet.Cells["C4"].PutValue("Y2"); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4" int seriesIndex = chart.NSeries.Add("A1:B4", true); //Setting the data source for the category data of NSeries chart.NSeries.CategoryData = "C1:C4"; Series series = chart.NSeries[seriesIndex]; //Setting the values of the series. series.Values = "=B1:B4"; //Changing the chart type of the series. series.Type = ChartType.Line; //Setting marker properties. series.Marker.MarkerStyle = ChartMarkerType.Circle; series.Marker.ForegroundColorSetType = FormattingType.Automatic; series.Marker.ForegroundColor = System.Drawing.Color.Black; series.Marker.BackgroundColorSetType = FormattingType.Automatic; //do your business //Saving the Excel file workbook.Save("book1.xls"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Excel object Dim sheetIndex As Int32 = workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "A4" cell worksheet.Cells("A4").PutValue(200) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(60) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(32) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a sample value to "B4" cell worksheet.Cells("B4").PutValue(40) 'Adding a sample value to "C1" cell as category data worksheet.Cells("C1").PutValue("Q1") 'Adding a sample value to "C2" cell as category data worksheet.Cells("C2").PutValue("Q2") 'Adding a sample value to "C3" cell as category data worksheet.Cells("C3").PutValue("Y1") 'Adding a sample value to "C4" cell as category data worksheet.Cells("C4").PutValue("Y2") 'Adding a chart to the worksheet Dim chartIndex As Int32 = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4" Dim seriesIndex As Int32 = chart.NSeries.Add("A1:B4", True) 'Setting the data source for the category data of NSeries chart.NSeries.CategoryData = "C1:C4" Dim series As Series = chart.NSeries(seriesIndex) 'Setting the values of the series. series.Values = "=B1:B4" 'Changing the chart type of the series. series.Type = ChartType.Line 'Setting marker properties. series.Marker.MarkerStyle = ChartMarkerType.Circle series.Marker.ForegroundColorSetType = FormattingType.Automatic series.Marker.ForegroundColor = System.Drawing.Color.Black series.Marker.BackgroundColorSetType = FormattingType.Automatic 'Saving the Excel file workbook.Save("book1.xls") Indicates whether the series is selected or filtered.True represents this series is filtered, and it will not be displayed on the chart. Represents the properties of layout. Moves the series up or down. The number of moving up or down. Move the series up if this is less than zero; Move the series down if this is greater than zero. Gets the collection of points in a series in a chart. When the chart is Pie of Pie or Bar of Pie, the last point is other point in first pie plot. Represents the background area of Series object. Represents border of Series object. Gets or sets the name of the data series. [C#] //Reference name to a cell chart.NSeries[0].Name = "=A1"; //Set a string to name chart.NSeries[0].Name = "First Series"; [Visual Basic] 'Reference name to a cell chart.NSeries[0].Name = "=A1" 'Set a string to name chart.NSeries[0].Name = "First Series" Gets the series's name that displays on the chart graph. Gets the number of the data values. Indicates whether the data source is vertical. Represents the Y values of this chart series. Represents format code of Values's NumberList. Represents format code of X Values's NumberList. Represents the x values of the chart series. Gets or sets the bubble sizes values of the chart series. Returns all the trendlines of this series. Represents curve smoothing. True if curve smoothing is turned on for the line chart or scatter chart. Applies only to line and scatter connected by lines charts. True if the series has a shadow. True if the series has a three-dimensional appearance. Applies only to bubble charts. Gets or sets the 3D shape type used with the 3-D bar or column chart. Represents the DataLabels object for the specified ASeries. Gets or sets a data series' type. Gets the marker. Indicates if this series is plotted on second value axis. Represents X direction error bar of the series. Represents Y direction error bar of the series. True if the line chart has high-low lines. Applies only to line charts. Returns a HiLoLines object that represents the high-low lines for a series on a line chart. Applies only to line charts. True if a stacked column chart or bar chart has series lines or if a Pie of Pie chart or Bar of Pie chart has connector lines between the two sections. Applies only to stacked column charts, bar charts, Pie of Pie charts, or Bar of Pie charts. Returns a SeriesLines object that represents the series lines for a stacked bar chart or a stacked column chart. Applies only to stacked bar and stacked column charts. True if the chart has drop lines. Applies only to line chart or area charts. Returns a object that represents the drop lines for a series on the line chart or area chart. Applies only to line chart or area charts. True if a line chart has up and down bars. Applies only to line charts. Returns an DropBars object that represents the up bars on a line chart. Applies only to line charts. Returns a object that represents the down bars on a line chart. Applies only to line charts. Represents if the color of points is varied. The chart must contain only one series. Returns or sets the space between bar or column clusters, as a percentage of the bar or column width. The value of this property must be between 0 and 500. Gets or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts, 0 to 360. Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. Returns or sets the size of the secondary section of either a pie of pie chart or a bar of pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. Returns or sets a value that how to determine which data points are in the second pie or bar on a pie of pie or bar of pie chart. Returns or sets a value that shall be used to determine which data points are in the second pie or bar on a pie of pie or bar of pie chart. Indicates whether the threshold value is automatic. Gets or sets the scale factor for bubbles in the specified chart group. It can be an integer value from 0 (zero) to 300, corresponding to a percentage of the default size. Applies only to bubble charts. Gets or sets what the bubble size represents on a bubble chart. BubbleSizeRepresents.SizeIsArea means the value is the area of the bubble. BubbleSizeRepresents.SizeIsWidth means the value is the width of the bubble. True if negative bubbles are shown for the chart group. Valid only for bubble charts. Returns or sets the size of the hole in a doughnut chart group. The hole size is expressed as a percentage of the chart size, between 10 and 90 percent. The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter. True if a radar chart has category axis labels. Applies only to radar charts. True if the series has leader lines. Represents leader lines on a chart. Leader lines connect data labels to data points. This object isn’t a collection; there’s no object that represents a single leader line. Gets the legend entry according to this series. Gets the object that holds the visual shape properties of the Series. Encapsulates a collection of objects. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Excel object int sheetIndex = workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[sheetIndex]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "A4" cell worksheet.Cells["A4"].PutValue(200); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(60); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(32); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a sample value to "B4" cell worksheet.Cells["B4"].PutValue(40); //Adding a sample value to "C1" cell as category data worksheet.Cells["C1"].PutValue("Q1"); //Adding a sample value to "C2" cell as category data worksheet.Cells["C2"].PutValue("Q2"); //Adding a sample value to "C3" cell as category data worksheet.Cells["C3"].PutValue("Y1"); //Adding a sample value to "C4" cell as category data worksheet.Cells["C4"].PutValue("Y2"); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4" chart.NSeries.Add("A1:B4", true); //Setting the data source for the category data of NSeries chart.NSeries.CategoryData = "C1:C4"; //Saving the Excel file workbook.Save("book1.xls"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Excel object Dim sheetIndex As Integer = workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "A4" cell worksheet.Cells("A4").PutValue(200) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(60) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(32) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a sample value to "B4" cell worksheet.Cells("B4").PutValue(40) 'Adding a sample value to "C1" cell as category data worksheet.Cells("C1").PutValue("Q1") 'Adding a sample value to "C2" cell as category data worksheet.Cells("C2").PutValue("Q2") 'Adding a sample value to "C3" cell as category data worksheet.Cells("C3").PutValue("Y1") 'Adding a sample value to "C4" cell as category data worksheet.Cells("C4").PutValue("Y2") 'Adding a chart to the worksheet Dim chartIndex As Integer = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4" chart.NSeries.Add("A1:B4", True) 'Setting the data source for the category data of NSeries chart.NSeries.CategoryData = "C1:C4" 'Saving the Excel file workbook.Save("book1.xls") Gets the element at the specified index. The zero based index of the element. The element at the specified index. Gets the element by order. The order of series The element series Remove at a series at the specific index. The index. Gets or sets the range of category Axis values. It can be a range of cells (such as, "d1:e10"), or a sequence of values (such as,"{2,6,8,10}"). Gets or sets the range of second category Axis values. It can be a range of cells (such as, "d1:e10"), or a sequence of values (such as,"{2,6,8,10}"). Only effects when some ASerieses plot on the second axis. Directly changes the orders of the two series. The current index The dest index NOTE: This method is now obsolete. Instead, please use SeriesCollection.SwapSeries method. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced. Directly changes the orders of the two series. The current index The dest index Sets the name of all the serieses in the chart. The index of the first series which you want to set the name. Specifies the area for the series name. >Specifies whether to plot the series from a range of cell values by row or by column.
If the start index is larger than the count of the serieses, it will return and do nothing.

If set data on contiguous cells, use colon to seperate them.For example, $C$2:$C$5.

If set data on contiguous cells, use comma to seperate them.For example, ($C$2,$D$5).
Adds the collection to a chart. Specifies values from which to plot the data series Specifies whether to plot the series from a range of cell values by row or by column. Return the first index of the added ASeries in the NSeries.
If set data on contiguous cells, use colon to seperate them.For example, R[1]C[1]:R[3]C[2].

If set data on contiguous cells, use comma to seperate them.For example,(R[1]C[1],R[3]C[2]).
Adds the collection to a chart. Specifies values from which to plot the data series Specifies whether to plot the series from a range of cell values by row or by column. Return the first index of the added ASeries in the NSeries.
If set data on contiguous cells, use colon to seperate them.For example, $C$2:$C$5.

If set data on non contiguous cells, use comma to seperate them.For example: ($C$2,$D$5).
Adds the collection to a chart. Specifies values from which to plot the data series Specifies whether to plot the series from a range of cell values by row or by column. Indicates whether the range contains series's name Return the first index of the added ASeries in the NSeries.
If set data on contiguous cells, use colon to seperate them.For example, $C$2:$C$5.

If set data on non contiguous cells, use comma to seperate them.For example, ($C$2,$D$5).
Represents if the color of points is varied. Clears the collection Represents the properties of series layout. Indicates whether showing connector lines between data points. Indicates whether showing the line connecting all mean points. Indicates whether showing outlier data points. Indicates whether showing markers denoting the mean. Indicates whether showing non-outlier data points. Represents the index of a subtotal data point. Represents the statistical properties for the series. Gets and sets the layout of map labels. Indicates whether the interval is closed on the left side. Gets and sets the region type of the map. Gets and sets the projection type of the map. Represents the text alignment type for the tick labels on the axis Represents the text shall be centered. Represents the text shall be left justified. Represents the text shall be right justified. Represents a tick label in the chart. X coordinates of Ticklabel item in ratio of chart width. Y coordinates of Ticklabel item in ratio of chart height. Width of Ticklabel item in ratio of chart width. Height of Ticklabel item in ratio of chart height. Represents the position type of tick-mark labels on the specified axis. Position type is high. Position type is low. Position type is next to axis. Position type is none. Represents the tick-mark labels associated with tick marks on a chart axis. Returns a object that represents the font of the specified TickLabels object. True if the text in the object changes font size when the object size changes. The default value is True. Gets and sets the display mode of the background Represents text rotation angle in clockwise.
0: Not rotated.

255: Top to Bottom.

-90: Downward.

90: Upward.
Indicates whether the rotation angle is automatic Represents the format string for the TickLabels object. The formatting string is same as a custom format string setting to a cell. For example, "$0". Represents the format number for the TickLabels object. True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). Gets and sets the display number format of tick labels. Gets and sets the distance between the axis labels and the axis line. The default distance is 100 percent, which represents the default spacing between the axis labels and the axis line. The value can be an integer percentage from 0 through 1000, relative to the axis label’s font size. Represents text reading order. NOTE: This member is now obsolete. Instead, please use TickLabels.ReadingOrder property. This property will be removed 12 months later since March 2020. Aspose apologizes for any inconvenience you may have experienced. Represents text reading order. Gets and sets the direction of text. Gets the display tick labels of the axis. Only available after calling method. Gets and sets the text alignment for the tick labels on the axis. Represents the tick mark type for the specified axis. Tick mark type is Cross. Tick mark type is Inside. Tick mark type is None. Tick mark type is Outside Represents the base unit for the category axis. Days Months Years Encapsulates the object that represents the title of chart or axis. [C#] Workbook workbook = new Workbook(); Worksheet sheet = workbook.Worksheets[0]; Cells cells = sheet.Cells; cells[0,1].PutValue("Income"); cells[1,0].PutValue("Company A"); cells[2,0].PutValue("Company B"); cells[3,0].PutValue("Company C"); cells[1,1].PutValue(10000); cells[2,1].PutValue(20000); cells[3,1].PutValue(30000); int chartIndex = sheet.Charts.Add(ChartType.Column, 9, 9, 21, 15); Chart chart = sheet.Charts[chartIndex]; //Setting the title of a chart chart.Title.Text = "Title"; //Setting the font color of the chart title to blue chart.Title.Font.Color = Color.Blue; //Setting the title of category axis of the chart chart.CategoryAxis.Title.Text = "Category"; //Setting the title of value axis of the chart chart.ValueAxis.Title.Text = "Value"; [Visual Basic] Dim workbook as Workbook = new Workbook() Dim sheet as Worksheet = workbook.Worksheets(0) Dim cells as Cells = sheet.Cells cells(0,1).PutValue("Income") cells(1,0).PutValue("Company A") cells(2,0).PutValue("Company B") cells(3,0).PutValue("Company C") cells(1,1).PutValue(10000) cells(2,1).PutValue(20000) cells(3,1).PutValue(30000) Dim chartIndex as Integer = sheet.Charts.Add(ChartType.Column, 9, 9, 21, 15) /// Dim chart as Chart = sheet.Charts(chartIndex) 'Setting the title of a chart chart.Title.Text = "Title" 'Setting the font color of the chart title to blue chart.Title.Font.Color = Color.Blue 'Setting the title of category axis of the chart chart.CategoryAxis.Title.Text = "Category" 'Setting the title of value axis of the chart chart.ValueAxis.Title.Text = "Value" Gets or sets the text of display unit label. Represents whether the title is visible. Gets or sets the x coordinate of the upper left corner in units of 1/4000 of the chart area. NOTE: This member is now obsolete. Please use Title.XRatioToChart property, instead. X = XRatioToChart * 4000; This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Gets or sets the y coordinate of the upper left corner in units of 1/4000 of the chart area. NOTE: This member is now obsolete. Please use Title.YRatioToChart property, instead. Y = YRatioToChart * 4000; This property will be removed 12 months later since February 2025. Aspose apologizes for any inconvenience you may have experienced. Gets or sets the x coordinate of the upper left corner in units of Fraction of the chart area. X In Pixels = XRatioToChart * Chart.ChartObject.Width; Gets or sets the y coordinate of the upper left corner in units of Fraction of the chart area. Y In Pixels = YRatioToChart * Chart.ChartObject.Width; Represents overlay centered title on chart without resizing chart. Gets rich text formatting of this Title. returns FontSetting array Represents a trendline in a chart. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Excel object int sheetIndex = workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[sheetIndex]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "A4" cell worksheet.Cells["A4"].PutValue(200); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(60); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(32); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a sample value to "B4" cell worksheet.Cells["B4"].PutValue(40); //Adding a sample value to "C1" cell as category data worksheet.Cells["C1"].PutValue("Q1"); //Adding a sample value to "C2" cell as category data worksheet.Cells["C2"].PutValue("Q2"); //Adding a sample value to "C3" cell as category data worksheet.Cells["C3"].PutValue("Y1"); //Adding a sample value to "C4" cell as category data worksheet.Cells["C4"].PutValue("Y2"); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4" chart.NSeries.Add("A1:B4", true); //Setting the data source for the category data of NSeries chart.NSeries.CategoryData = "C1:C4"; //adding a linear trendline int index = chart.NSeries[0].TrendLines.Add(TrendlineType.Linear); Trendline trendline = chart.NSeries[0].TrendLines[index]; //Setting the custom name of the trendline. trendline.Name = "Linear"; //Displaying the equation on chart trendline.DisplayEquation = true; //Displaying the R-Squared value on chart trendline.DisplayRSquared = true; //Saving the Excel file workbook.Save("book1.xls"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Excel object Dim sheetIndex As Int32 = workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "A4" cell worksheet.Cells("A4").PutValue(200) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(60) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(32) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a sample value to "B4" cell worksheet.Cells("B4").PutValue(40) 'Adding a sample value to "C1" cell as category data worksheet.Cells("C1").PutValue("Q1") 'Adding a sample value to "C2" cell as category data worksheet.Cells("C2").PutValue("Q2") 'Adding a sample value to "C3" cell as category data worksheet.Cells("C3").PutValue("Y1") 'Adding a sample value to "C4" cell as category data worksheet.Cells("C4").PutValue("Y2") 'Adding a chart to the worksheet Dim chartIndex As Int32 = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4" chart.NSeries.Add("A1:B4", True) 'Setting the data source for the category data of NSeries Chart.NSeries.CategoryData = "C1:C4" 'adding a linear trendline Dim index As Int32 = chart.NSeries(0).TrendLines.Add(TrendlineType.Linear) Dim trendline As Trendline = chart.NSeries(0).TrendLines(index) 'Setting the custom name of the trendline. trendline.Name = "Linear" 'Displaying the equation on chart trendline.DisplayEquation = True 'Displaying the R-Squared value on chart trendline.DisplayRSquared = True 'Saving the Excel file workbook.Save("book1.xls") Returns if Microsoft Excel automatically determines the name of the trendline. Returns the trendline type. Returns the name of the trendline. Returns or sets the trendline order (an integer greater than 1) when the trendline type is Polynomial. The order must be between 2 and 6. Returns or sets the period for the moving-average trendline. This value should be between 2 and 255. And it must be less than the number of the chart points in the series Returns or sets the number of periods (or units on a scatter chart) that the trendline extends forward. The number of periods must be greater than or equal to zero. Returns or sets the number of periods (or units on a scatter chart) that the trendline extends backward. The number of periods must be greater than or equal to zero. If the chart type is column ,the number of periods must be between 0 and 0.5 Represents if the equation for the trendline is displayed on the chart (in the same data label as the R-squared value). Setting this property to True automatically turns on data labels. Represents if the R-squared value of the trendline is displayed on the chart (in the same data label as the equation). Setting this property to True automatically turns on data labels. Returns or sets the point where the trendline crosses the value axis. Represents the DataLabels object for the specified series. Gets the legend entry according to this trendline Represents a collection of all the objects for the specified data series. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Excel object int sheetIndex = workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[sheetIndex]; worksheet.Cells["A1"].PutValue(50); worksheet.Cells["A2"].PutValue(100); worksheet.Cells["A3"].PutValue(150); worksheet.Cells["A4"].PutValue(200); worksheet.Cells["B1"].PutValue(60); worksheet.Cells["B2"].PutValue(32); worksheet.Cells["B3"].PutValue(50); worksheet.Cells["B4"].PutValue(40); //Adding a chart to the worksheet int chartIndex = workbook.Worksheets[0].Charts.Add(ChartType.Column, 3, 3, 15, 10); Chart chart = workbook.Worksheets[0].Charts[chartIndex]; chart.NSeries.Add("A1:a3", true); chart.NSeries[0].TrendLines.Add(TrendlineType.Linear, "MyTrendLine"); Trendline line = chart.NSeries[0].TrendLines[0]; line.DisplayEquation = true; line.DisplayRSquared = true; line.Color = Color.Red; [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Excel object Dim sheetIndex As Int32 = workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex) worksheet.Cells("A1").PutValue(50) worksheet.Cells("A2").PutValue(100) worksheet.Cells("A3").PutValue(150) worksheet.Cells("A4").PutValue(200) worksheet.Cells("B1").PutValue(60) worksheet.Cells("B2").PutValue(32) worksheet.Cells("B3").PutValue(50) worksheet.Cells("B4").PutValue(40) 'Adding a chart to the worksheet Dim chartIndex As Integer = workbook.Worksheets(0).Charts.Add(ChartType.Column,3,3,15,10) Dim chart As Chart = workbook.Worksheets(0).Charts(chartIndex) chart.NSeries.Add("A1:a3", True) chart.NSeries(0).TrendLines.Add(TrendlineType.Linear, "MyTrendLine") Dim line As Trendline = chart.NSeries(0).TrendLines(0) line.DisplayEquation = True line.DisplayRSquared = True line.Color = Color.Red Adds a object to this collection with specified type. Trendline type. object index. Adds a object to this collection with specified type and name. Trendline type. Trendline name. object index. Gets a object by its index. Represents the trendline type. Exponential Linear Logarithmic MovingAverage Polynomial Power Encapsulates the object that represents the walls of a 3-D chart. Gets the x coordinate of the left-bottom corner of Wall center in units of 1/4000 of chart's width after calls Chart.Calculate() method. Gets the y coordinate of the left-bottom corner of Wall center in units of 1/4000 of chart's height after calls Chart.Calculate() method. Gets the width of left to right in units of 1/4000 of chart's width after calls Chart.Calculate() method. Gets the depth front to back in units of 1/4000 of chart's width after calls Chart.Calculate() method. Gets the height of top to bottom in units of 1/4000 of chart's height after calls Chart.Calculate() method. Gets the x coordinate of the left-bottom corner of Wall center in units of pixels after calls Chart.Calculate() method. Gets the y coordinate of the left-bottom corner of Wall center in units of pixels after calls Chart.Calculate() method. Gets the width of left to right in units of pixels after calls Chart.Calculate() method. Gets the depth front to back in units of pixels after calls Chart.Calculate() method. Gets the height of top to bottom in units of pixels after calls Chart.Calculate() method. Gets the number of cube points after calls Chart.Calculate() method. Gets x-coordinate of the apex point of walls cube after calls Chart.Calculate() method. The number of apex points of walls cube is eight Gets y-coordinate of the apex point of walls cube after calls Chart.Calculate() method. The number of apex points of walls cube is eight. The Aspose.Cells.Charts namespace provides classes that allow to access and drawing charts and sparkline in Microsoft Excel spreadsheets. A sparkline represents a tiny chart or graphic in a worksheet cell that provides a visual representation of data. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; sheet.Cells["A1"].PutValue(5); sheet.Cells["B1"].PutValue(2); sheet.Cells["C1"].PutValue(1); sheet.Cells["D1"].PutValue(3); // Define the CellArea CellArea ca = new CellArea(); ca.StartColumn = 4; ca.EndColumn = 4; ca.StartRow = 0; ca.EndRow = 0; int idx = sheet.SparklineGroups.Add(Aspose.Cells.Charts.SparklineType.Line, sheet.Name + "!A1:D1", false, ca); SparklineGroup group = sheet.SparklineGroups[idx]; idx = group.Sparklines.Add(sheet.Name + "!A1:D1", 0, 4); Sparkline line = group.Sparklines[idx]; Console.WriteLine("Saprkline data range: " + line.DataRange + ", row: " + line.Row + ", column: " + line.Column); line.ToImage("output.png", new ImageOrPrintOptions()); Represents the data range of the sparkline. Gets the row index of the sparkline. Gets the column index of the sparkline. Converts a sparkline to an image. The image file name. The image options Converts a sparkline to an image. The image stream. The image options. Represents the minimum and maximum value types for the sparkline vertical axis. Automatic for each sparkline. Same for all sparklines in the group. Custom value for sparkline. Encapsulates a collection of objects. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; sheet.Cells["A1"].PutValue(5); sheet.Cells["B1"].PutValue(2); sheet.Cells["C1"].PutValue(1); sheet.Cells["D1"].PutValue(3); // Define the CellArea CellArea ca = new CellArea(); ca.StartColumn = 4; ca.EndColumn = 4; ca.StartRow = 0; ca.EndRow = 0; int idx = sheet.SparklineGroups.Add(Aspose.Cells.Charts.SparklineType.Line, sheet.Name + "!A1:D1", false, ca); SparklineGroup group = sheet.SparklineGroups[idx]; group.Sparklines.Add(sheet.Name + "!A1:D1", 0, 4); book.Save("output.xlsx", SaveFormat.Xlsx); Gets the element at the specified index. The zero based index of the element. The element at the specified index. Add a sparkline. Specifies the new data range of the sparkline. The row index of the location. The column index of the location. Removes the sparkline is organized into sparkline group. A SparklineGroup contains a variable number of sparkline items. A sparkline group specifies the type, display settings and axis settings for the sparklines. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; sheet.Cells["A1"].PutValue(5); sheet.Cells["B1"].PutValue(2); sheet.Cells["C1"].PutValue(1); sheet.Cells["D1"].PutValue(3); // Define the CellArea CellArea ca = new CellArea(); ca.StartColumn = 4; ca.EndColumn = 4; ca.StartRow = 0; ca.EndRow = 0; int idx = sheet.SparklineGroups.Add(Aspose.Cells.Charts.SparklineType.Line, "A1:D1", false, ca); SparklineGroup group = sheet.SparklineGroups[idx]; group.Sparklines.Add(sheet.Name + "!A1:D1", 0, 4); // Create CellsColor CellsColor clr = book.CreateCellsColor(); clr.Color = Color.Orange; group.SeriesColor = clr; // set the high points are colored green and the low points are colored red group.ShowHighPoint = true; group.ShowLowPoint = true; group.HighPointColor.Color = Color.Green; group.LowPointColor.Color = Color.Red; // set line weight group.LineWeight = 1.0; book.Save("output.xlsx", SaveFormat.Xlsx); Resets the data range and location range of the sparkline group. This method will clear original sparkline items in the group and creates new sparkline items for the new ranges. Specifies the new data range of the sparkline group. Specifies whether to plot the sparklines from the new data range by row or by column. Specifies where the sparklines to be placed. Gets and sets the preset style type of the sparkline group. Gets the collection of object. NOTE: This member is now obsolete. Instead, please use SparklineGroup.Sparklines property. This property will be removed 12 months later since November 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the collection of object. Indicates the sparkline type of the sparkline group. Indicates how to plot empty cells. Indicates whether to show data in hidden rows and columns. Indicates whether to highlight the highest points of data in the sparkline group. Gets and sets the color of the highest points of data in the sparkline group. Indicates whether to highlight the lowest points of data in the sparkline group. Gets and sets the color of the lowest points of data in the sparkline group. Indicates whether to highlight the negative values on the sparkline group with a different color or marker. Gets and sets the color of the negative values on the sparkline group. Indicates whether to highlight the first point of data in the sparkline group. Gets and sets the color of the first point of data in the sparkline group. Indicates whether to highlight the last point of data in the sparkline group. Gets and sets the color of the last point of data in the sparkline group. Indicates whether to highlight each point in each line sparkline in the sparkline group. Gets and sets the color of points in each line sparkline in the sparkline group. Gets and sets the color of the sparklines in the sparkline group. Indicates whether the plot data is right to left. Gets and sets the line weight in each line sparkline in the sparkline group, in the unit of points. Gets and sets the color of the horizontal axis in the sparkline group. Indicates whether to show the sparkline horizontal axis. The horizontal axis appears if the sparkline has data that crosses the zero axis. Represents the range that contains the date values for the sparkline data. Represents the vertical axis maximum value type. Gets and sets the custom maximum value for the vertical axis. Represents the vertical axis minimum value type. Gets and sets the custom minimum value for the vertical axis. Encapsulates a collection of objects. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; sheet.Cells["A1"].PutValue(5); sheet.Cells["B1"].PutValue(2); sheet.Cells["C1"].PutValue(1); sheet.Cells["D1"].PutValue(3); // Define the CellArea CellArea ca = new CellArea(); ca.StartColumn = 4; ca.EndColumn = 4; ca.StartRow = 0; ca.EndRow = 0; int idx = sheet.SparklineGroups.Add(Aspose.Cells.Charts.SparklineType.Line, "A1:D1", false, ca); SparklineGroup group = sheet.SparklineGroups[idx]; group.Sparklines.Add(sheet.Name + "!A1:D1", 0, 4); book.Save("output.xlsx", SaveFormat.Xlsx); Gets the element at the specified index. The zero based index of the element. The element at the specified index. Adds an with a to the collection. Specifies the type of the Sparkline group. object index. Adds an with to the collection. Specifies the type of the Sparkline group. Specifies the data range of the sparkline group. Specifies whether to plot the sparklines from the data range by row or by column. Specifies where the sparklines to be placed. object index. Clears the sparklines that is inside an area of cells. Specifies the area of cells Clears the sparkline groups that overlaps an area of cells. Specifies the area of cells Represents the preset style types for sparkline. Style 1 Style 2 Style 3 Style 4 Style 5 Style 6 Style 7 Style 8 Style 9 Style 10 Style 11 Style 12 Style 13 Style 14 Style 15 Style 16 Style 17 Style 18 Style 19 Style 20 Style 21 Style 22 Style 23 Style 24 Style 25 Style 26 Style 27 Style 28 Style 29 Style 30 Style 31 Style 32 Style 33 Style 34 Style 35 Style 36 No preset style. Represents the sparkline types. Line sparkline. Column sparkline. Win/Loss sparkline. Represents a single column in a worksheet. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the first worksheet Worksheet worksheet = workbook.Worksheets[0]; Style style = workbook.CreateStyle(); //Setting the background color to Blue style.BackgroundColor = Color.Blue; //Setting the foreground color to Red style.ForegroundColor= Color.Red; //setting Background Pattern style.Pattern = BackgroundType.DiagonalStripe; //New Style Flag StyleFlag styleFlag = new StyleFlag(); //Set All Styles styleFlag.All = true; //Get first Column Column column = worksheet.Cells.Columns[0]; //Apply Style to first Column column.ApplyStyle(style, styleFlag); //Saving the Excel file workbook.Save("book1.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the first worksheet Dim worksheet As Worksheet = workbook.Worksheets(0) Dim style As Style = workbook.CreateStyle() 'Setting the background color to Blue style.BackgroundColor = Color.Blue 'Setting the foreground color to Red style.ForegroundColor = Color.Red 'setting Background Pattern style.Pattern = BackgroundType.DiagonalStripe 'New Style Flag Dim styleFlag As New StyleFlag() 'Set All Styles styleFlag.All = True 'Get first Column Dim column As Column = worksheet.Cells.Columns(0) 'Apply Style to first Column column.ApplyStyle(style, styleFlag) 'Saving the Excel file workbook.Save("book1.xls") Gets the index of this column. Gets and sets the column width in unit of characters. For spreadsheet, column width is measured as the number of characters of the maximum digit width of the numbers 0~9 as rendered in the normal style's font. Gets the group level of the column. Indicates whether the column is hidden. Indicates whether this column has custom style settings(different from the default one inherited from workbook). Applies formats for a whole column. The style object which will be applied. Flags which indicates applied formatting properties. Gets the style of this column. NOTE: This member is now obsolete. Instead, please use Column.GetStyle() method to get the default style of this column. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the style of this column. Modifying the returned style object directly takes no effect for this column or any cells in this column. You have to call or method to apply the change to this column.

Column's style is the style which will be inherited by cells in this column(those cells that have no custom style settings, such as existing cells that have not been set style explicitly, or those that have not been instantiated)
Sets the style of this column. the style to be used as the default style for cells in this column. This method only sets the given style as the default style for this column, without changing the style settings for existing cells in this column. To update style settings of existing cells to the specified style at the same time, please use whether the column is collapsed Collection of the objects that represent the individual column(setting)s in a worksheet. The Column object only represents the settings such as column width, styles, .etc. for the whole column, has nothing to do with the fact that there are non-empty cells(data) or not in corresponding column. And the "Count" of this collection only represents the count Column objects that have been instantiated in this collection, has nothing to do with the fact that there are non-empty cells(data) or not in the worksheet. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the first worksheet Worksheet worksheet = workbook.Worksheets[0]; //Add new Style to Workbook Style style = workbook.CreateStyle(); //Setting the background color to Blue style.ForegroundColor = Color.Blue; //setting Background Pattern style.Pattern = BackgroundType.Solid; //New Style Flag StyleFlag styleFlag = new StyleFlag(); //Set All Styles styleFlag.All = true; //Change the default width of first ten columns for (int i = 0; i < 10; i++) { worksheet.Cells.Columns[i].Width = 20; } //Get the Column with non default formatting ColumnCollection columns = worksheet.Cells.Columns; foreach (Column column in columns) { //Apply Style to first ten Columns column.ApplyStyle(style, styleFlag); } //Saving the Excel file workbook.Save("book1.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the first worksheet Dim worksheet As Worksheet = workbook.Worksheets(0) 'Add new Style to Workbook Dim style As Style = workbook.CreateStyles() 'Setting the background color to Blue style.ForegroundColor = Color.Blue 'setting Background Pattern style.Pattern = BackgroundType.Solid 'New Style Flag Dim styleFlag As New StyleFlag() 'Set All Styles styleFlag.All = True 'Change the default width of first ten columns For i As Integer = 0 To 9 worksheet.Cells.Columns(i).Width = 20 Next i 'Get the Column with non default formatting Dim columns As ColumnCollection = worksheet.Cells.Columns For Each column As Column In columns 'Apply Style to first ten Columns column.ApplyStyle(style, styleFlag) Next column 'Saving the Excel file workbook.Save("book1.xls") Gets the column object by the index. Returns the column object. NOTE: This member is now obsolete. Instead, please use Columns.GetColumnByIndex() method. This property will be removed 12 months later since June 2010. Aspose apologizes for any inconvenience you may have experienced. Gets the object by the position in the list. The position in the list. Returns the column object. Gets a object by column index. The Column object of given column index will be instantiated if it does not exist before. Represents the custom icon of conditional formatting rule. Get the icon set data icon's type icon's index Gets the image data with the setting of cell. The setting of cell. Returns the image data of icon. Gets the icon set data. Gets and sets the icon set type. Gets and sets the icon's index in the icon set. Represents a collection of objects. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet sheet = workbook.Worksheets[0]; //Get Conditional Formatting ConditionalFormattingCollection cformattings = sheet.ConditionalFormattings; //Adds an empty conditional formatting int index = cformattings.Add(); //Get newly added Conditional formatting FormatConditionCollection fcs = cformattings[index]; //Sets the conditional format range. CellArea ca = new CellArea(); ca.StartRow = 0; ca.EndRow = 0; ca.StartColumn = 0; ca.EndColumn = 0; fcs.AddArea(ca); ca = new CellArea(); ca.StartRow = 1; ca.EndRow = 1; ca.StartColumn = 1; ca.EndColumn = 1; fcs.AddArea(ca); //Sets condition int idx = fcs.AddCondition(FormatConditionType.IconSet); FormatCondition cond = fcs[idx]; //Sets condition's type cond.IconSet.Type = IconSetType.ArrowsGray3; //Add custom iconset condition. ConditionalFormattingIcon cfIcon = cond.IconSet.CfIcons[0]; cfIcon.Type = IconSetType.Arrows3; cfIcon.Index = 0; ConditionalFormattingIcon cfIcon1 = cond.IconSet.CfIcons[1]; cfIcon1.Type = IconSetType.ArrowsGray3; cfIcon1.Index = 1; ConditionalFormattingIcon cfIcon2 = cond.IconSet.CfIcons[2]; cfIcon2.Type = IconSetType.Boxes5; cfIcon2.Index = 2; //Saving the Excel file workbook.Save("output.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() Dim sheet As Worksheet = workbook.Worksheets(0) 'Get Conditional Formatting Dim cformattings As ConditionalFormattingCollection = sheet.ConditionalFormattings 'Adds an empty conditional formatting Dim index As Integer = cformattings.Add() 'Get newly added Conditional formatting Dim fcs As FormatConditionCollection = cformattings(index) 'Sets the conditional format range. Dim ca As New CellArea() ca.StartRow = 0 ca.EndRow = 0 ca.StartColumn = 0 ca.EndColumn = 0 fcs.AddArea(ca) ca = New CellArea() ca.StartRow = 1 ca.EndRow = 1 ca.StartColumn = 1 ca.EndColumn = 1 fcs.AddArea(ca) //Sets condition Dim idx As Integer =fcs.AddCondition(FormatConditionType.IconSet) Dim cond As FormatCondition=fcs[idx] //Sets condition's type cfIcon.Type = IconSetType.ArrowsGray3 'Add custom iconset condition. Dim cfIcon As ConditionalFormattingIcon = cond.IconSet.CfIcons[0] cfIcon.Type = IconSetType.Arrows3 cfIcon.Index=0 Dim cfIcon1 As ConditionalFormattingIcon = cond.IconSet.CfIcons[1] cfIcon1.Type = IconSetType.ArrowsGray3 cfIcon1.Index=1 Dim cfIcon2 As ConditionalFormattingIcon = cond.IconSet.CfIcons[2] cfIcon2.Type = IconSetType.Boxes5 cfIcon2.Index=2 'Saving the Excel file workbook.Save("output.xls") Gets the ConditionalFormattingIcon element at the specified index. The zero based index of the element. The element at the specified index. Adds object. The value type. The Index. Returns the index of new object in the list. Adds object. Returns the index of new object in the list. Specifies the axis position for a range of cells with conditional formatting as data bars. Display the axis at a variable position based on the ratio of the minimum negative value to the maximum positive value in the range. Positive values are displayed in a left-to-right direction. Negative values are displayed in a right-to-left direction. When all values are positive or all values are negative, no axis is displayed. Display the axis at the midpoint of the cell regardless of the set of values in the range. Positive values are displayed in a left-to-right direction. Negative values are displayed in a right-to-left direction. No axis is displayed, and both positive and negative values are displayed in the left-to-right direction. Represents the border of the data bars specified by a conditional formatting rule. Gets or sets the border's color of data bars specified by a conditional formatting rule. Gets or sets the border's type of data bars specified by a conditional formatting rule. Specifies the border type of a data bar. The data bar has no border. The data bar has a solid border. Specifies how a data bar is filled with color. The data bar is filled with solid color. The data bar is filled with a color gradient. Specifies whether to use the same border and fill color as positive data bars. Use the color specified in the Negative Value and Axis Setting dialog box or by using the ColorType and BorderColorType properties of the NegativeBarFormat object. Use the same color as positive data bars. Represents the color settings of the data bars for negative values that are defined by a data bar conditional formatting rule. Gets or sets a FormatColor object that you can use to specify the border color for negative data bars. Gets whether to use the same border color as positive data bars. Gets or sets a FormatColor object that you can use to specify the fill color for negative data bars. Gets or sets whether to use the same fill color as positive data bars. Describe the AboveAverage conditional formatting rule. This conditional formatting rule highlights cells that are above or below the average for all values in the range. Get or set the flag indicating whether the rule is an "above average" rule. 'true' indicates 'above average'. Default value is true. Get or set the flag indicating whether the 'aboveAverage' and 'belowAverage' criteria is inclusive of the average itself, or exclusive of that value. 'true' indicates to include the average value in the criteria. Default value is false. Get or set the number of standard deviations to include above or below the average in the conditional formatting rule. The input value must between 0 and 3 (include 0 and 3). Setting this value to 0 means stdDev is not set. The default value is 0. Describe the ColorScale conditional formatting rule. This conditional formatting rule creates a gradated color scale on the cells. Indicates whether conditional formatting is 3 color scale. Get or set this ColorScale's min value object. Cannot set null or CFValueObject with type FormatConditionValueType.Max to it. Get or set this ColorScale's mid value object. Cannot set CFValueObject with type FormatConditionValueType.Max or FormatConditionValueType.Min to it. Get or set this ColorScale's max value object. Cannot set null or CFValueObject with type FormatConditionValueType.Min to it. Get or set the gradient color for the minimum value in the range. Get or set the gradient color for the middle value in the range. Get or set the gradient color for the maximum value in the range. Encapsulates a collection of objects. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet sheet = workbook.Worksheets[0]; //Get Conditional Formatting ConditionalFormattingCollection cformattings = sheet.ConditionalFormattings; //Adds an empty conditional formatting int index = cformattings.Add(); //Get newly added Conditional formatting FormatConditionCollection fcs = cformattings[index]; //Sets the conditional format range. CellArea ca = new CellArea(); ca.StartRow = 0; ca.EndRow = 0; ca.StartColumn = 0; ca.EndColumn = 0; fcs.AddArea(ca); ca = new CellArea(); ca.StartRow = 1; ca.EndRow = 1; ca.StartColumn = 1; ca.EndColumn = 1; fcs.AddArea(ca); //Add condition. int conditionIndex = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "=A2", "100"); //Add condition. int conditionIndex2 = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "50", "100"); //Sets the background color. FormatCondition fc = fcs[conditionIndex]; fc.Style.BackgroundColor = Color.Red; //Saving the Excel file workbook.Save("output.xls"); [VB.NET] 'Instantiating a Workbook object DDim workbook As Workbook = New Workbook() Dim sheet As Worksheet = workbook.Worksheets(0) 'Get Conditional Formatting Dim cformattings As ConditionalFormattingCollection = sheet.ConditionalFormattings 'Adds an empty conditional formatting Dim index As Integer = cformattings.Add() 'Get newly added Conditional formatting Dim fcs As FormatConditionCollection = cformattings(index) 'Sets the conditional format range. Dim ca As New CellArea() ca.StartRow = 0 ca.EndRow = 0 ca.StartColumn = 0 ca.EndColumn = 0 fcs.AddArea(ca) ca = New CellArea() ca.StartRow = 1 ca.EndRow = 1 ca.StartColumn = 1 ca.EndColumn = 1 fcs.AddArea(ca) 'Add condition. Dim conditionIndex As Integer = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "=A2", "100") 'Add condition. Dim conditionIndex2 As Integer = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "50", "100") 'Sets the background color. Dim fc As FormatCondition = fcs(conditionIndex) fc.Style.BackgroundColor = Color.Red 'Saving the Excel file workbook.Save("output.xls") Remove all conditional formatting in the range. The start row of the range. The start column of the range. The number of rows of the range. The number of columns of the range. Copies conditional formatting. The conditional formatting Gets the FormatConditions element at the specified index. The zero based index of the element. Adds a FormatConditions to the collection. FormatConditions object index. Represents the result of conditional formatting which applies to a cell. Gets the conditional result style. Gets the image of icon set. Gets the DataBar object. Gets the ColorScale object. Gets the display color of color scale. Describes the values of the interpolation points in a gradient scale, dataBar or iconSet. Get or set the value of this conditional formatting value object. It should be used in conjunction with Type. If the value is string and start with "=", it will be processed as a formula, otherwise we will process it as a simple value. Get or set the type of this conditional formatting value object. Setting the type to FormatConditionValueType.Min or FormatConditionValueType.Max will auto set "Value" to null. Get or set the Greater Than Or Equal flag. Use only for icon sets, determines whether this threshold value uses the greater than or equal to operator. 'false' indicates 'greater than' is used instead of 'greater than or equal to'. Default value is true. Describes a collection of CFValueObject. Use only for icon sets. Get the CFValueObject element at the specified index. The zero based index of the element. The element at the specified index. Adds object. The value type. The value. Returns the index of new object in the list. Describe the DataBar conditional formatting rule. This conditional formatting rule displays a gradated data bar in the range of cells. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet sheet = workbook.Worksheets[0]; //Adds an empty conditional formatting int index = sheet.ConditionalFormattings.Add(); FormatConditionCollection fcs = sheet.ConditionalFormattings[index]; //Sets the conditional format range. CellArea ca = new CellArea(); ca.StartRow = 0; ca.EndRow = 2; ca.StartColumn = 0; ca.EndColumn = 0; fcs.AddArea(ca); //Adds condition. int idx = fcs.AddCondition(FormatConditionType.DataBar); fcs.AddArea(ca); FormatCondition cond = fcs[idx]; //Get Databar DataBar dataBar = cond.DataBar; dataBar.Color = Color.Orange; //Set Databar properties dataBar.MinCfvo.Type = FormatConditionValueType.Percentile; dataBar.MinCfvo.Value = 30; dataBar.ShowValue = false; dataBar.BarBorder.Type = DataBarBorderType.Solid; dataBar.BarBorder.Color = Color.Plum; dataBar.BarFillType = DataBarFillType.Solid; dataBar.AxisColor = Color.Red; dataBar.AxisPosition = DataBarAxisPosition.Midpoint; dataBar.NegativeBarFormat.ColorType = DataBarNegativeColorType.Color; dataBar.NegativeBarFormat.Color = Color.White; dataBar.NegativeBarFormat.BorderColorType = DataBarNegativeColorType.Color; dataBar.NegativeBarFormat.BorderColor = Color.Yellow; //Put Cell Values Aspose.Cells.Cell cell1 = sheet.Cells["A1"]; cell1.PutValue(10); Aspose.Cells.Cell cell2 = sheet.Cells["A2"]; cell2.PutValue(120); Aspose.Cells.Cell cell3 = sheet.Cells["A3"]; cell3.PutValue(260); //Saving the Excel file workbook.Save("book1.xlsx"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() Dim sheet As Worksheet = workbook.Worksheets(0) 'Adds an empty conditional formatting Dim index As Integer = sheet.ConditionalFormattings.Add() Dim fcs As FormatConditionCollection = sheet.ConditionalFormattings(index) 'Sets the conditional format range. Dim ca As New CellArea() ca.StartRow = 0 ca.EndRow = 2 ca.StartColumn = 0 ca.EndColumn = 0 fcs.AddArea(ca) 'Adds condition. Dim idx As Integer = fcs.AddCondition(FormatConditionType.DataBar) fcs.AddArea(ca) Dim cond As FormatCondition = fcs(idx) 'Get Databar Dim dataBar As DataBar = cond.DataBar dataBar.Color = Color.Orange 'Set Databar properties dataBar.MinCfvo.Type = FormatConditionValueType.Percentile dataBar.MinCfvo.Value = 30 dataBar.ShowValue = False dataBar.BarBorder.Type = DataBarBorderType.Solid dataBar.BarBorder.Color = Color.Plum dataBar.BarFillType = DataBarFillType.Solid dataBar.AxisColor = Color.Red dataBar.AxisPosition = DataBarAxisPosition.Midpoint dataBar.NegativeBarFormat.ColorType = DataBarNegativeColorType.Color dataBar.NegativeBarFormat.Color = Color.White dataBar.NegativeBarFormat.BorderColorType = DataBarNegativeColorType.Color dataBar.NegativeBarFormat.BorderColor = Color.Yellow 'Put Cell Values Dim cell1 As Aspose.Cells.Cell = sheet.Cells("A1") cell1.PutValue(10) Dim cell2 As Aspose.Cells.Cell = sheet.Cells("A2") cell2.PutValue(120) Dim cell3 As Aspose.Cells.Cell = sheet.Cells("A3") cell3.PutValue(260) 'Saving the Excel file workbook.Save("book1.xlsx") Gets the color of the axis for cells with conditional formatting as data bars. Gets or sets the position of the axis of the data bars specified by a conditional formatting rule. Gets or sets how a data bar is filled with color. Gets or sets the direction the databar is displayed. Gets an object that specifies the border of a data bar. Gets the NegativeBarFormat object associated with a data bar conditional formatting rule. Get or set this DataBar's min value object. Cannot set null or CFValueObject with type FormatConditionValueType.Max to it. Get or set this DataBar's max value object. Cannot set null or CFValueObject with type FormatConditionValueType.Min to it. Get or set this DataBar's Color. Represents the min length of data bar . Represents the max length of data bar . Get or set the flag indicating whether to show the values of the cells on which this data bar is applied. Default value is true. Render data bar in cell to image byte array. Indicate the data bar in which cell to be rendered ImageOrPrintOptions contains some property of output image Represents conditional formatting condition. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet sheet = workbook.Worksheets[0]; //Adds an empty conditional formatting int index = sheet.ConditionalFormattings.Add(); FormatConditionCollection fcs = sheet.ConditionalFormattings[index]; //Sets the conditional format range. CellArea ca = new CellArea(); ca.StartRow = 0; ca.EndRow = 0; ca.StartColumn = 0; ca.EndColumn = 0; fcs.AddArea(ca); ca = new CellArea(); ca.StartRow = 1; ca.EndRow = 1; ca.StartColumn = 1; ca.EndColumn = 1; fcs.AddArea(ca); //Adds condition. int conditionIndex = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "=A2", "100"); //Adds condition. int conditionIndex2 = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "50", "100"); //Sets the background color. FormatCondition fc = fcs[conditionIndex]; fc.Style.BackgroundColor = Color.Red; //Saving the Excel file workbook.Save("output.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() Dim sheet As Worksheet = workbook.Worksheets(0) ' Adds an empty conditional formatting Dim index As Integer = sheet.ConditionalFormattings.Add() Dim fcs As FormatConditionCollection = sheet.ConditionalFormattings(index) 'Sets the conditional format range. Dim ca As CellArea = New CellArea() ca.StartRow = 0 ca.EndRow = 0 ca.StartColumn = 0 ca.EndColumn = 0 fcs.AddArea(ca) ca = New CellArea() ca.StartRow = 1 ca.EndRow = 1 ca.StartColumn = 1 ca.EndColumn = 1 fcs.AddArea(ca) 'Adds condition. Dim conditionIndex As Integer = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "=A2", "100") 'Adds condition. Dim conditionIndex2 As Integer = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "50", "100") 'Sets the background color. Dim fc As FormatCondition = fcs(conditionIndex) fc.Style.BackgroundColor = Color.Red 'Saving the Excel file workbook.Save("output.xls") Gets the value or expression associated with this format condition. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The value or expression associated with this format condition. Gets the value or expression associated with this format condition. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The value or expression associated with this format condition. Gets the value or expression of the conditional formatting of the cell. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The row index. The column index. The value or expression associated with the conditional formatting of the cell. The given cell must be contained by this conditional formatting, otherwise null will be returned. Gets the value or expression of the conditional formatting of the cell. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The row index. The column index. The value or expression associated with the conditional formatting of the cell. The given cell must be contained by this conditional formatting, otherwise null will be returned. Sets the value or expression associated with this format condition. The value or expression associated with this format condition. If the input value starts with '=', then it will be taken as formula. Otherwise it will be taken as plain value(text, number, bool). For text value that starts with '=', user may input it as formula in format: "=\"=...\"". The value or expression associated with this format condition. The input format is same with formula1 Whether the formula is R1C1 formula. Whether the formula is locale formatted. Sets the value or expression associated with this format condition. The value or expression associated with this format condition. If the input value starts with '=', then it will be taken as formula. Otherwise it will be taken as plain value(text, number, bool). For text value that starts with '=', user may input it as formula in format: "=\"=...\"". Whether the formula is R1C1 formula. Whether the formula is locale formatted. Sets the value or expression associated with this format condition. The value or expression associated with this format condition. If the input value starts with '=', then it will be taken as formula. Otherwise it will be taken as plain value(text, number, bool). For text value that starts with '=', user may input it as formula in format: "=\"=...\"". Whether the formula is R1C1 formula. Whether the formula is locale formatted. Gets and sets the value or expression associated with conditional formatting. Please add all areas before setting formula. For setting formula for this condition, if the input value starts with '=', then it will be taken as formula. Otherwise it will be taken as plain value(text, number, bool). For text value that starts with '=', user may input it as formula in format: "=\"=...\"". Gets the formula of the conditional formatting of the cell. The row index. The column index. The formula. Gets and sets the value or expression associated with conditional formatting. Please add all areas before setting formula. For setting formula for this condition, if the input value starts with '=', then it will be taken as formula. Otherwise it will be taken as plain value(text, number, bool). For text value that starts with '=', user may input it as formula in format: "=\"=...\"". Gets the formula of the conditional formatting of the cell. The row index. The column index. The formula. Gets and sets the conditional format operator type. True, no rules with lower priority may be applied over this rule, when this rule evaluates to true. Only applies for Excel 2007; The priority of this conditional formatting rule. This value is used to determine which format should be evaluated and rendered. Lower numeric values are higher priority than higher numeric values, where '1' is the highest priority. Gets or setts style of conditional formatted cell ranges. Gets and sets whether the conditional format Type. Get the conditional formatting's "IconSet" instance. The default instance's IconSetType is TrafficLights31. Valid only for type = IconSet. Get the conditional formatting's "DataBar" instance. The default instance's color is blue. Valid only for type is DataBar. Get the conditional formatting's "ColorScale" instance. The default instance is a "green-yellow-red" 3ColorScale . Valid only for type = ColorScale. Get the conditional formatting's "Top10" instance. The default instance's rule highlights cells whose values fall in the top 10 bracket. Valid only for type is Top10. Get the conditional formatting's "AboveAverage" instance. The default instance's rule highlights cells that are above the average for all values in the range. Valid only for type = AboveAverage. The text value in a "text contains" conditional formatting rule. Valid only for type = containsText, notContainsText, beginsWith and endsWith. The default value is null. The applicable time period in a "date occurring…" conditional formatting rule. Valid only for type = timePeriod. The default value is TimePeriodType.Today. Represents conditional formatting. The FormatConditions can contain up to three conditional formats. [C#] //Create a new Workbook. Workbook workbook = new Workbook(); //Get the first worksheet. Worksheet sheet = workbook.Worksheets[0]; //Adds an empty conditional formatting int index = sheet.ConditionalFormattings.Add(); FormatConditionCollection fcs = sheet.ConditionalFormattings[index]; //Sets the conditional format range. CellArea ca = new CellArea(); ca.StartRow = 0; ca.EndRow = 0; ca.StartColumn = 0; ca.EndColumn = 0; fcs.AddArea(ca); ca = new CellArea(); ca.StartRow = 1; ca.EndRow = 1; ca.StartColumn = 1; ca.EndColumn = 1; fcs.AddArea(ca); //Adds condition. int conditionIndex = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "=A2", "100"); //Adds condition. int conditionIndex2 = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "50", "100"); //Sets the background color. FormatCondition fc = fcs[conditionIndex]; fc.Style.BackgroundColor = Color.Red; //Saving the Excel file workbook.Save("output.xls"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() Dim sheet As Worksheet = workbook.Worksheets(0) ' Adds an empty conditional formatting Dim index As Integer = sheet.ConditionalFormattings.Add() Dim fcs As FormatConditionCollection = sheet.ConditionalFormattings(index) 'Sets the conditional format range. Dim ca As CellArea = New CellArea() ca.StartRow = 0 ca.EndRow = 0 ca.StartColumn = 0 ca.EndColumn = 0 fcs.AddArea(ca) ca = New CellArea() ca.StartRow = 1 ca.EndRow = 1 ca.StartColumn = 1 ca.EndColumn = 1 fcs.AddArea(ca) 'Adds condition. Dim conditionIndex As Integer = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "=A2", "100") 'Adds condition. Dim conditionIndex2 As Integer = fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "50", "100") 'Sets the background color. Dim fc As FormatCondition = fcs(conditionIndex) fc.Style.BackgroundColor = Color.Red 'Saving the Excel file workbook.Save("output.xls") Adds a formatting condition and effected cell rang to the FormatConditions The FormatConditions can contain up to three conditional formats. References to the other sheets are not allowed in the formulas of conditional formatting. Conditional formatted cell range. Type of conditional formatting.It could be one of the members of FormatConditionType. Comparison operator.It could be one of the members of OperatorType. The value or expression associated with conditional formatting. The value or expression associated with conditional formatting [0]:Formatting condition object index;[1] Effected cell rang index. Adds a conditional formatted cell range. Conditional formatted cell range. Conditional formatted cell rang index. Adds a formatting condition. The type of format condition. The operator type The value or expression associated with conditional formatting. If the input value starts with '=', then it will be taken as formula. Otherwise it will be taken as plain value(text, number, bool). For text value that starts with '=', user may input it as formula in format: "=\"=...\"". The value or expression associated with conditional formatting. The input format is same with formula1 Formatting condition object index; Add a format condition. Format condition type. Formatting condition object index; Gets the count of the conditions. Gets count of conditionally formatted ranges. Gets the formatting condition by index. the index of the formatting condition to return. the formatting condition Gets the conditional formatted cell range by index. the index of the conditional formatted cell range. the conditional formatted cell range Removes conditional formatted cell range by index. The index of the conditional formatted cell range to be removed. Remove conditional formatting int the range. The startRow of the range. The startColumn of the range. The number of rows of the range. The number of columns of the range. Returns TRUE, this FormatCondtionCollection should be removed. Removes the formatting condition by index. The index of the formatting condition to be removed. Conditional format rule type. This conditional formatting rule compares a cell value to a formula calculated result, using an operator. This conditional formatting rule contains a formula to evaluate. When the formula result is true, the cell is highlighted. This conditional formatting rule highlights cells whose values fall in the top N or bottom N bracket, as specified. This conditional formatting rule highlights unique values in the range. This conditional formatting rule highlights duplicated values. This conditional formatting rule highlights cells containing given text. Equivalent to using the SEARCH() sheet function to determine whether the cell contains the text. This conditional formatting rule highlights cells that do not contain given text. Equivalent of using SEARCH() sheet function to determine whether the cell contains the text or not. This conditional formatting rule highlights cells in the range that begin with the given text. Equivalent to using the LEFT() sheet function and comparing values. This conditional formatting rule highlights cells ending with given text. Equivalent to using the RIGHT() sheet function and comparing values. This conditional formatting rule highlights cells that are completely blank. Equivalent of using LEN(TRIM()). This means that if the cell contains only characters that TRIM() would remove, then it is considered blank. An empty cell is also considered blank. This conditional formatting rule highlights cells that are not blank. Equivalent of using LEN(TRIM()). This means that if the cell contains only characters that TRIM() would remove, then it is considered blank. An empty cell is also considered blank. This conditional formatting rule highlights cells with formula errors. Equivalent to using ISERROR() sheet function to determine if there is a formula error. This conditional formatting rule highlights cells without formula errors. Equivalent to using ISERROR() sheet function to determine if there is a formula error. This conditional formatting rule highlights cells containing dates in the specified time period. The underlying value of the cell is evaluated, therefore the cell does not need to be formatted as a date to be evaluated. For example, with a cell containing the value 38913 the conditional format shall be applied if the rule requires a value of 7/14/2006. This conditional formatting rule highlights cells that are above or below the average for all values in the range. This conditional formatting rule creates a gradated color scale on the cells. This conditional formatting rule displays a gradated data bar in the range of cells. This conditional formatting rule applies icons to cells according to their values. Condition value type. The minimum/ midpoint / maximum value for the gradient is determined by a formula. Indicates that the maximum value in the range shall be used as the maximum value for the gradient. Indicates that the minimum value in the range shall be used as the minimum value for the gradient. Indicates that the minimum / midpoint / maximum value for the gradient is specified by a constant numeric value. Value indicates a percentage between the minimum and maximum values in the range shall be used as the minimum / midpoint / maximum value for the gradient. Value indicates a percentile ranking in the range shall be used as the minimum / midpoint / maximum value for the gradient. Indicates that the Automatic maximum value in the range shall be used as the Automatic maximum value for the gradient. Indicates that the Automatic minimum value in the range shall be used as the Automatic minimum value for the gradient. Describe the IconSet conditional formatting rule. This conditional formatting rule applies icons to cells according to their values. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet sheet = workbook.Worksheets[0]; //Adds an empty conditional formatting int index = sheet.ConditionalFormattings.Add(); FormatConditionCollection fcs = sheet.ConditionalFormattings[index]; //Sets the conditional format range. CellArea ca = new CellArea(); ca.StartRow = 0; ca.EndRow = 2; ca.StartColumn = 0; ca.EndColumn = 0; fcs.AddArea(ca); //Adds condition. int idx = fcs.AddCondition(FormatConditionType.IconSet); fcs.AddArea(ca); FormatCondition cond = fcs[idx]; //Get Icon Set IconSet iconSet = cond.IconSet; //Set Icon Type iconSet.Type = IconSetType.Arrows3; //Put Cell Values Aspose.Cells.Cell cell1 = sheet.Cells["A1"]; cell1.PutValue(10); Aspose.Cells.Cell cell2 = sheet.Cells["A2"]; cell2.PutValue(120); Aspose.Cells.Cell cell3 = sheet.Cells["A3"]; cell3.PutValue(260); //Saving the Excel file workbook.Save("book1.xlsx"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() Dim sheet As Worksheet = workbook.Worksheets(0) 'Adds an empty conditional formatting Dim index As Integer = sheet.ConditionalFormattings.Add() Dim fcs As FormatConditionCollection = sheet.ConditionalFormattings(index) 'Sets the conditional format range. Dim ca As New CellArea() ca.StartRow = 0 ca.EndRow = 2 ca.StartColumn = 0 ca.EndColumn = 0 fcs.AddArea(ca) 'Adds condition. Dim idx As Integer = fcs.AddCondition(FormatConditionType.IconSet) fcs.AddArea(ca) Dim cond As FormatCondition = fcs(idx) 'Get Icon Set Dim iconSet As IconSet = cond.IconSet 'Set Icon Type iconSet.Type = IconSetType.Arrows3 'Put Cell Values Dim cell1 As Aspose.Cells.Cell = sheet.Cells("A1") cell1.PutValue(10) Dim cell2 As Aspose.Cells.Cell = sheet.Cells("A2") cell2.PutValue(120) Dim cell3 As Aspose.Cells.Cell = sheet.Cells("A3") cell3.PutValue(260) 'Saving the Excel file workbook.Save("book1.xlsx") Get the from the collection Get the CFValueObjects instance. Get or Set the icon set type to display. Setting the type will auto check if the current Cfvos's count is accord with the new type. If not accord, old Cfvos will be cleaned and default Cfvos will be added. Indicates whether the icon set is custom. Default value is false. Get or set the flag indicating whether to show the values of the cells on which this icon set is applied. Default value is true. Get or set the flag indicating whether to reverses the default order of the icons in this icon set. Default value is false. Icon set type for conditional formatting. The threshold values for triggering the different icons within a set are configurable, and the icon order is reversible. 3 arrows icon set. 3 gray arrows icon set. 3 flags icon set. 3 signs icon set. 3 symbols icon set (circled). 3 Symbols icon set (uncircled). 3 traffic lights icon set (unrimmed). 3 traffic lights icon set with thick black border. 4 arrows icon set. 4 gray arrows icon set. 4 ratings icon set. 4 'red to black' icon set. 4 traffic lights icon set. 5 arrows icon set. 5 gray arrows icon set. 5 quarters icon set. 5 rating icon set. 3 stars set 5 boxes set 3 triangles set None CustomSet. This element is read-only. 3 smilies. Only for .ods. 3 color smilies. Only for .ods. Represents the operator type of conditional format and data validation. Represents Between operator of conditional format and data validation. Represents Equal operator of conditional format and data validation. Represents GreaterThan operator of conditional format and data validation. Represents GreaterOrEqual operator of conditional format and data validation. Represents LessThan operator of conditional format and data validation. Represents LessOrEqual operator of conditional format and data validation. Represents no comparison. Represents NotBetween operator of conditional format and data validation. Represents NotEqual operator of conditional format and data validation. Used in a FormatConditionType.TimePeriod conditional formatting rule. These are dynamic time periods, which change based on the date the conditional formatting is refreshed / applied. Today's date. Yesterday's date. Tomorrow's date. A date in the last seven days. A date occurring in this calendar month. A date occurring in the last calendar month. A date occurring in the next calendar month. A date occurring this week. A date occurring last week. A date occurring next week. A date occurring this year. Only for .ods. A date occurring last year. Only for .ods. A date occurring next year. Only for .ods. Describe the Top10 conditional formatting rule. This conditional formatting rule highlights cells whose values fall in the top N or bottom N bracket, as specified. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet sheet = workbook.Worksheets[0]; //Adds an empty conditional formatting int index = sheet.ConditionalFormattings.Add(); FormatConditionCollection fcs = sheet.ConditionalFormattings[index]; //Sets the conditional format range. CellArea ca = CellArea.CreateCellArea(0, 0, 10, 10); fcs.AddArea(ca); //Adds condition. int conditionIndex = fcs.AddCondition(FormatConditionType.Top10, OperatorType.None, null, null); //Sets the background color. FormatCondition fc = fcs[conditionIndex]; fc.Style.BackgroundColor = Color.Red; Top10 top10 = fc.Top10; //Set the Top N top10.Rank = 5; //Saving the Excel file workbook.Save("output.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() Dim sheet As Worksheet = workbook.Worksheets(0) ' Adds an empty conditional formatting Dim index As Integer = sheet.ConditionalFormattings.Add() Dim fcs As FormatConditionCollection = sheet.ConditionalFormattings(index) 'Sets the conditional format range. Dim ca As CellArea = CellArea.CreateCellArea(0, 0, 10, 10) fcs.AddArea(ca) 'Adds condition. Dim conditionIndex As Integer = fcs.AddCondition(FormatConditionType.Top10, OperatorType.None, null, null); 'Sets the background color. Dim fc As FormatCondition = fcs(conditionIndex) fc.Style.BackgroundColor = Color.Red Dim top10 as Top10 = fc.Top10 'Set the Top N top10.Rank = 5 'Saving the Excel file workbook.Save("output.xls") Get or set whether a "top/bottom n" rule is a "top/bottom n percent" rule. Default value is false. Get or set whether a "top/bottom n" rule is a "bottom n" rule. Default value is false. Get or set the value of "n" in a "top/bottom n" conditional formatting rule. If IsPercent is true, the value must between 0 and 100. Otherwise it must between 0 and 1000. Default value is 10. Represents consolidation function. Represents Sum function. Represents Count function. Represents Average function. Represents Max function. Represents Min function. Represents Product function. Represents Count Nums function. Represents StdDev function. Represents StdDevp function. Represents Var function. Represents Varp function. Represents Distinct Count function. Only valid for PivotTable with Data Module created since by 2013. The event triggered when exporting an object, such as Picture. Gets the object that contains the data to be saved. @return the data source object. Gets the object to be exported. the object to be exported. Represents five types of html cross string. Display like MS Excel,depends on the next cell. If the next cell is null,the string will cross,or it will be truncated Display the string like MS Excel exporting html. Display HTML cross string, this performance for creating large html files will be more than ten times faster than setting the value to Default or FitToCell. Display HTML cross string and hide the right string when the texts overlap. Only displaying the string within the width of cell. Represents two types of showing the hidden columns in html. Hidden the hidden columns in html page. Remove the hidden columns in html page. Represents two types of showing the hidden rows in html. Hidden the hidden rows in html page. Remove the hidden rows in html page. Represents how export OfficeMath to HTML. Converts OfficeMath to HTML as image specified by <img> tag. Converts OfficeMath to HTML using MathML. Represents the exported file path provider. Gets the full path of the file by Worksheet name when exporting Worksheet to html separately. So the references among the Worksheets can be exported correctly. Worksheet name the full path of the file Represents the stream options. Initializes a new instance of the class. The type to load the linked resource. The default path. Initializes a new instance of the class. Gets and sets the type of loading resource. The default path(URL) saved in generated html file for the referred source. For example, the sheet data saved in xxx_files/sheet001.htm, the url used in the main html file should be like "src="xxx_files/sheet001.htm"" The user custom path(URL) saved in generated html file for the referred source. If not defined by user, DefaultPath will be used. For example, the sheet data will be saved by user to d:/sheet001.htm, the url used in the main html file should be "d:/sheet001.htm" or other valid relative path that can be accessed by the main html file. Gets/Sets the stream Allows users to manipulate objects while exporting. The following example creates a Workbook, opens a file named designer.xls in it and makes the horizontal and vertical scroll bars invisible for the Workbook. It then replaces two string values with an Integer value and string value respectively within the spreadsheet and finally sends the updated file to the client browser. [C#] //custom implementation of IExportObjectListener class CustomExportObjectListener : IExportObjectListener { private int imgIdx = 0; public object ExportObject(ExportObjectEvent e) { Object source = e.GetSource(); if (source is Shape) { Shape shape = (Shape)source; string url = null; switch (shape.MsoDrawingType) { case MsoDrawingType.Picture: { url = SaveImage(((Picture)shape).Data, imgIdx, ((Picture)shape).ImageType); break; } } if (url != null) { imgIdx++; } return url; } return null; } private string SaveImage(byte[] data, int imgIdx, ImageType format) { //here save the image to any location, then return the url(relative or absolute) that the generated html can get the image return "temp1/temp2.png"; } } //Save html file with custom listener Workbook book = null; //build your workbook here HtmlSaveOptions saveOptions = new HtmlSaveOptions(); saveOptions.ExportObjectListener = new CustomExportObjectListener(); Stream stream = null; //build your stream here book.Save("res.html", saveOptions); //or here you can build your out put stream and save the workbook to stream Export one object. The event triggered when one object needs to be exported. The information about the result of exporting object.
  • For exporting objects when export workbook to HTML format, the result is URL string to access the saved Image from the html file which contains this exported object.
The Aspose.Cells.Json namespace contains all classes of JSON. Represents type of exporting hyperlinks to json. Export display string Export url Export as html string. The Aspose.Cells.Ods namespace contains all classes of loading and converting OpenDocument Spreadsheet files. Represents the cell field of ods. Represents the custom format of the field's value. Gets and sets the type of the field. Get and sets the row index of the cell. Get and sets the column index of the cell. Represents the fields of ODS. Gets the field by the index. The index. Gets the field by row and column index. The row index. The column index. Adds a field. The row index. The column index. The type of the field. The number format of the field. Update fields value to the cells. Represents the cell field type of ods. Current date. The name of the sheet. The name of the file. Represents the type of ODS generator. Libre Office Open Office Represents the page background of ods. Gets and sets the page background type. Gets and sets the color of background. Gets and sets the page background graphic type. Gets and set the background graphic position. Indicates whether it's a linked graphic. Gets and sets the linked graphic path. Gets and sets the graphic data. Represents the position. Top left. Top center. Top right. Center left. Center. Center right. Bottom left. Bottom center. Bottom right. Represents the type of formatting page background with image. Set the image at specific position. Stretch the image. Repeat and repeat the image. Represents the page background type of ods. No background. Formats the background with color. Formats the background with image. Open Document Format version type. None strict. There are some difference between Excel and ODF. In order to keep the data of Excel file, we can not follow the strict of ODF. ODF Version 1.1 ODF Version 1.2 ODF Version 1.3 Represents the default edit language. Represents auto detecting edit language according to the text itself. Represents English language. Represents Chinese, Japanese, Korean language. Setting for rendering Emf metafile. Only rendering Emf records. Prefer rendering EmfPlus records. Enumerates grid line Type. Represents dotted line. Represents hair line. Indicates which pages will not be printed. Prints all pages. Don't print the pages which the cells are blank. Don't print the pages which cells only contain styles. Enumerates displaying text type when the text width is larger than cell width. Display text like in Microsoft Excel. Display all the text by crossing other cells and keep text of crossed cells. Display all the text by crossing other cells and override text of crossed cells. Only display the text within the width of cell. Represents which kind of rows should be ajusted. No adjsut. If the row is empty, change font size to fit row height. Represents the type when exporting to slides. Exporting as view in MS Excel. Exporting as printing. The Aspose.Cells.Slides namespace contains classes that define settings for converting Excel to PowerPoint. The Aspose.Cells.Pivot namespace contains all classes of rendering and manipulating PivotTable in Excel Spreadsheet files. Represents group by type. Group by numbers. NOTE: This method is now obsolete. Instead, please use PivotGroupByType.Numbers enum. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Group by numbers. Presents Seconds groupby type. Presents Minutes groupby type. Presents Hours groupby type. Presents Days groupby type. Presents Months groupby type. Presents Quarters groupby type. Presents Years groupby type. Represents an item of custom grouped field. The constructor of custom group item of pivot field. The name of group item All indexes to the items of base pivot field. Presents the selected area of the PivotTable. Presents the selected area of the PivotTable. Gets all filters for this PivotArea. Select the area with filters. The region of the PivotTable to which this rule applies. Position of the field within the axis to which this rule applies. Specifies what can be selected in a PivotTable during a structured selection. Select a field in the region as an area. The region type. The name of pivot field. Select a field in the region as an area. The region type. The pivot field. Indicates whether only the data values (in the data area of the view) for an item selection are selected and does not include the item labels. Indicates whether only the data labels for an item selection are selected. Indicates whether the row grand total is included. Indicates whether the column grand total is included. Gets and sets the region of the PivotTable to which this rule applies. Gets and sets the type of selection rule. Indicates whether the rule refers to an area that is in outline mode. Gets cell areas of this pivot area. Represents a list of pivot area. Adds pivot area. The pivot area. Remove one pivot conditional formatted area setting. The index Gets a object; Adds an area based on pivot table view. The area based on pivot table view. Represents the filter of for . Gets which subtotal is set for this filter. The subtotal function type. Subtotal for the filter. The subtotal function. Indicates if showing this subtotal data. Indicates whether this field has selection. Only works when the PivotTable is in Outline view. Represents the list of filters for Gets filter from the list by the index. The Index Indicates the type of rule being used to describe an area or aspect of the PivotTable. No Pivot area. Represents a header or item. Represents something in the data area. Represents the whole PivotTable. Represents the blank cells at the top-left of the PivotTable (top-right for RTL sheets). Represents a field button. Represents the blank cells at the top-right of the PivotTable (top-left for RTL sheets). Represents a PivotTable Format Condition in PivotFormatCondition Collection. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; cells[5, 0].Value = "grape"; cells[6, 0].Value = "blueberry"; cells[7, 0].Value = "kiwi"; cells[8, 0].Value = "cherry"; cells[0, 1].Value = "year"; cells[1, 1].Value = 2020; cells[2, 1].Value = 2020; cells[3, 1].Value = 2020; cells[4, 1].Value = 2020; cells[5, 1].Value = 2021; cells[6, 1].Value = 2021; cells[7, 1].Value = 2021; cells[8, 1].Value = 2021; cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; cells[5, 2].Value = 90; cells[6, 2].Value = 100; cells[7, 2].Value = 110; cells[8, 2].Value = 120; PivotTableCollection pivots = sheet.PivotTables; int pivotIndex = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "year"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; //Add PivotFormatCondition int formatIndex = pivot.ConditionalFormats.Add(); PivotConditionalFormat pfc = pivot.ConditionalFormats[formatIndex]; pfc.AddFieldArea(PivotFieldType.Data, pivot.DataFields[0]); int idx = pfc.FormatConditions.AddCondition(FormatConditionType.CellValue); FormatCondition fc = pfc.FormatConditions[idx]; fc.Formula1 = "100"; fc.Operator = OperatorType.GreaterOrEqual; fc.Style.BackgroundColor = Color.Red; pivot.RefreshData(); pivot.CalculateData(); //do your business book.Save("out.xlsx"); [Visual Basic] Dim book As Workbook = New Workbook() Dim sheet As Worksheet = book.Worksheets(0) Dim cells As Cells = sheet.Cells cells(0, 0).Value = "fruit" cells(1, 0).Value = "grape" cells(2, 0).Value = "blueberry" cells(3, 0).Value = "kiwi" cells(4, 0).Value = "cherry" cells(5, 0).Value = "grape" cells(6, 0).Value = "blueberry" cells(7, 0).Value = "kiwi" cells(8, 0).Value = "cherry" cells(0, 1).Value = "year" cells(1, 1).Value = 2020 cells(2, 1).Value = 2020 cells(3, 1).Value = 2020 cells(4, 1).Value = 2020 cells(5, 1).Value = 2021 cells(6, 1).Value = 2021 cells(7, 1).Value = 2021 cells(8, 1).Value = 2021 cells(0, 2).Value = "amount" cells(1, 2).Value = 50 cells(2, 2).Value = 60 cells(3, 2).Value = 70 cells(4, 2).Value = 80 cells(5, 2).Value = 90 cells(6, 2).Value = 100 cells(7, 2).Value = 110 cells(8, 2).Value = 120 Dim pivots As PivotTableCollection = sheet.PivotTables Dim pivotIndex As Int32 = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable") Dim pivot As PivotTable = pivots(pivotIndex) pivot.AddFieldToArea(PivotFieldType.Row, "fruit") Pivot.AddFieldToArea(PivotFieldType.Column, "year") Pivot.AddFieldToArea(PivotFieldType.Data, "amount") pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10 'Add PivotFormatCondition Dim formatIndex As Int32 = pivot.ConditionalFormats.Add() Dim pfc As PivotConditionalFormat = pivot.ConditionalFormats(formatIndex) pfc.AddFieldArea(PivotFieldType.Data, pivot.DataFields(0)) Dim idx As Int32 = pfc.FormatConditions.AddCondition(FormatConditionType.CellValue) Dim fc As FormatCondition = pfc.FormatConditions(idx) fc.Formula1 = "100" fc.Operator = OperatorType.GreaterOrEqual fc.Style.BackgroundColor = Color.Red pivot.RefreshData() pivot.CalculateData() book.Save("out_vb.xlsx") Gets all cell areas where this conditional format applies to. Gets all pivot areas. Adds an area based on pivot table view. The cell area. Applies the conditional format to range. Only for the data region. The selected row. The selected column. The scope Adds an area of pivot field. The region type. The name of pivot field. Adds an area of pivot field. The region type. The pivot field. Get conditions for the pivot table conditional format . Get and set scope type for the pivot table conditional format . Get and set rule type for the pivot table condition format . Represents all conditional formats of pivot table. Adds a pivot FormatCondition to the collection. pivot FormatCondition object index. not supported Gets the pivot FormatCondition object at the specific index. pivot FormatCondition object. Represents PivotTable condition formatting rule type. Indicates that Top N conditional formatting is not evaluated Indicates that Top N conditional formatting is evaluated across the entire scope range. Indicates that Top N conditional formatting is evaluated for each row. Indicates that Top N conditional formatting is evaluated for each column. Represents PivotTable condition formatting scope type. Indicates that conditional formatting is applied to the selected data fields. Indicates that conditional formatting is applied to the selected PivotTable field intersections. Indicates that conditional formatting is applied to the selected cells. Represents data display format in the PivotTable data field. Represents normal display format. Represents difference from display format. Represents percentage of display format. Represents percentage difference from display format. Represents running total in display format. Represents percentage of row display format. Represents percentage of column display format. Represents percentage of total display format. Represents index display format. Represents percentage of parent row total display format. Represents percentage of parent column total display format. Represents percentage of parent total display format. Represents percentage of running total in display format. Represents smallest to largest display format. Represents largest to smallest display format. Represents a PivotTable Format Condition in PivotFormatCondition Collection. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; cells[5, 0].Value = "grape"; cells[6, 0].Value = "blueberry"; cells[7, 0].Value = "kiwi"; cells[8, 0].Value = "cherry"; cells[0, 1].Value = "year"; cells[1, 1].Value = 2020; cells[2, 1].Value = 2020; cells[3, 1].Value = 2020; cells[4, 1].Value = 2020; cells[5, 1].Value = 2021; cells[6, 1].Value = 2021; cells[7, 1].Value = 2021; cells[8, 1].Value = 2021; cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; cells[5, 2].Value = 90; cells[6, 2].Value = 100; cells[7, 2].Value = 110; cells[8, 2].Value = 120; PivotTableCollection pivots = sheet.PivotTables; int pivotIndex = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "year"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; //Add PivotFormatCondition int formatIndex = pivot.PivotFormatConditions.Add(); PivotFormatCondition pfc = pivot.PivotFormatConditions[formatIndex]; pfc.AddDataAreaCondition(pivot.DataFields[0]); FormatConditionCollection fcc = pfc.FormatConditions; fcc.AddArea(pivot.DataBodyRange); int idx = fcc.AddCondition(FormatConditionType.CellValue); FormatCondition fc = fcc[idx]; fc.Formula1 = "100"; fc.Operator = OperatorType.GreaterOrEqual; fc.Style.BackgroundColor = Color.Red; pivot.RefreshData(); pivot.CalculateData(); //do your business book.Save("out.xlsx"); [Visual Basic] Dim book As Workbook = New Workbook() Dim sheet As Worksheet = book.Worksheets(0) Dim cells As Cells = sheet.Cells cells(0, 0).Value = "fruit" cells(1, 0).Value = "grape" cells(2, 0).Value = "blueberry" cells(3, 0).Value = "kiwi" cells(4, 0).Value = "cherry" cells(5, 0).Value = "grape" cells(6, 0).Value = "blueberry" cells(7, 0).Value = "kiwi" cells(8, 0).Value = "cherry" cells(0, 1).Value = "year" cells(1, 1).Value = 2020 cells(2, 1).Value = 2020 cells(3, 1).Value = 2020 cells(4, 1).Value = 2020 cells(5, 1).Value = 2021 cells(6, 1).Value = 2021 cells(7, 1).Value = 2021 cells(8, 1).Value = 2021 cells(0, 2).Value = "amount" cells(1, 2).Value = 50 cells(2, 2).Value = 60 cells(3, 2).Value = 70 cells(4, 2).Value = 80 cells(5, 2).Value = 90 cells(6, 2).Value = 100 cells(7, 2).Value = 110 cells(8, 2).Value = 120 Dim pivots As PivotTableCollection = sheet.PivotTables Dim pivotIndex As Int32 = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable") Dim pivot As PivotTable = pivots(pivotIndex) pivot.AddFieldToArea(PivotFieldType.Row, "fruit") Pivot.AddFieldToArea(PivotFieldType.Column, "year") Pivot.AddFieldToArea(PivotFieldType.Data, "amount") pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10 'Add PivotFormatCondition Dim formatIndex As Int32 = pivot.PivotFormatConditions.Add() Dim pfc As PivotFormatCondition = pivot.PivotFormatConditions(formatIndex) pfc.AddDataAreaCondition(pivot.DataFields(0)) Dim fcc As FormatConditionCollection = pfc.FormatConditions fcc.AddArea(pivot.DataBodyRange) Dim idx As Int32 = fcc.AddCondition(FormatConditionType.CellValue) Dim fc As FormatCondition = fcc(idx) fc.Formula1 = "100" fc.Operator = OperatorType.GreaterOrEqual fc.Style.BackgroundColor = Color.Red pivot.RefreshData() pivot.CalculateData() book.Save("out_vb.xlsx") NOTE: This class is now obsolete. Instead, please use PivotConditional class. This method will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Adds PivotTable conditional format limit in the data fields. The name of PivotField. Adds PivotTable conditional format limit in the data fields. The PivotField in the data fields. Adds PivotTable conditional format limit in the row fields. The name of PivotField. Adds PivotTable conditional format limit in the row fields. The PivotField in the row fields. Adds PivotTable conditional format limit in the column fields. The name of PivotField. Adds PivotTable conditional format limit in the column fields. The PivotField in the column fields. Sets conditional areas of PivotFormatCondition object. Get and set scope type for the pivot table conditional format . Get and set rule type for the pivot table condition format . Get conditions for the pivot table conditional format . Represents PivotTable Format Conditions. NOTE: This method is now obsolete. Instead, please use PivotConditionalFormatCollection class. This method will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Adds a pivot FormatCondition to the collection. pivot FormatCondition object index. not supported Gets the count of conditional formats. Remove a conditional formats. Gets the pivot FormatCondition object at the specific index. pivot FormatCondition object. Represents PivotTable auto format type. Represents None format type. Represents Classic auto format type. Represents Report1 format type. Represents Report2 format type. Represents Report3 format type. Represents Report4 format type. Represents Report5 format type. Represents Report6 format type. Represents Report7 format type. Represents Report8 format type. Represents Report9 format type. Represents Report10 format type. Represents Table1 format type. Represents Table2 format type. Represents Table3 format type. Represents Table4 format type. Represents Table5 format type. Represents Table6 format type. Represents Table7 format type. Represents Table8 format type. Represents Table9 format type. Represents Table10 format type. Represents the format defined in the PivotTable. Gets the pivot area. Gets the formatted style. Sets the style of the pivot area. Represents the collection of formats applied to PivotTable. Gets the format by the index. The index. Add a . The index of new format. Formats selected area. The region of the PivotTable to which this rule applies. Position of the field within the axis to which this rule applies. The subtotal filter type of the pivot field Indicates how to select data. Indicates whether selecting grand total rows. Indicates whether selecting grand total columns. The style which appies to the area of the pivot table. Specifies what can be selected in a PivotTable during a structured selection. These constants can be combined to select multiple types. Data and labels Only selects data Only selects labels Represents the pivot table style type. Represents the field grouped by date time range. Gets the data time group type. Gets the start date time of the group. Gets the end date time of the group. Gets the internal of the group. Gets the types of grouping by date time. Check whether the field is grouped by the type. The group type Rrepsents the discrete group of pivot field Gets the group type. Gets the discrete items. Represents a field in a PivotTable report. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; cells[5, 0].Value = "grape"; cells[6, 0].Value = "blueberry"; cells[7, 0].Value = "kiwi"; cells[8, 0].Value = "cherry"; cells[0, 1].Value = "year"; cells[1, 1].Value = 2020; cells[2, 1].Value = 2020; cells[3, 1].Value = 2020; cells[4, 1].Value = 2020; cells[5, 1].Value = 2021; cells[6, 1].Value = 2021; cells[7, 1].Value = 2021; cells[8, 1].Value = 2021; cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; cells[5, 2].Value = 90; cells[6, 2].Value = 100; cells[7, 2].Value = 110; cells[8, 2].Value = 120; PivotTableCollection pivots = sheet.PivotTables; int pivotIndex = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "year"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; //Change PivotField's attributes PivotField rowField = pivot.RowFields[0]; rowField.DisplayName = "custom display name"; pivot.RefreshData(); pivot.CalculateData(); //do your business book.Save("out.xlsx"); [Visual Basic] Dim book As Workbook = New Workbook() Dim sheet As Worksheet = book.Worksheets(0) Dim cells As Cells = sheet.Cells cells(0, 0).Value = "fruit" cells(1, 0).Value = "grape" cells(2, 0).Value = "blueberry" cells(3, 0).Value = "kiwi" cells(4, 0).Value = "cherry" cells(5, 0).Value = "grape" cells(6, 0).Value = "blueberry" cells(7, 0).Value = "kiwi" cells(8, 0).Value = "cherry" cells(0, 1).Value = "year" cells(1, 1).Value = 2020 cells(2, 1).Value = 2020 cells(3, 1).Value = 2020 cells(4, 1).Value = 2020 cells(5, 1).Value = 2021 cells(6, 1).Value = 2021 cells(7, 1).Value = 2021 cells(8, 1).Value = 2021 cells(0, 2).Value = "amount" cells(1, 2).Value = 50 cells(2, 2).Value = 60 cells(3, 2).Value = 70 cells(4, 2).Value = 80 cells(5, 2).Value = 90 cells(6, 2).Value = 100 cells(7, 2).Value = 110 cells(8, 2).Value = 120 Dim pivots As PivotTableCollection = sheet.PivotTables Dim pivotIndex As Int32 = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable") Dim pivot As PivotTable = pivots(pivotIndex) pivot.AddFieldToArea(PivotFieldType.Row, "fruit") Pivot.AddFieldToArea(PivotFieldType.Column, "year") Pivot.AddFieldToArea(PivotFieldType.Data, "amount") pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10 'Change PivotField's attributes Dim rowField As PivotField = pivot.RowFields(0) rowField.DisplayName = "custom display name" pivot.RefreshData() pivot.CalculateData() book.Save("out_vb.xlsx") Gets the pivot items of the pivot field Gets the group range of the pivot field NOTE: This method is now obsolete. Instead, please use PivotField.GroupSettings property. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Gets the group settings of the pivot field. If this field is not grouped, Null will be returned. Init the pivot items of the pivot field Automatically group the field with internal The internal of group. Automatic value will be assigned if it's zero, Indicates whether adding a new field to the pivottable. Group the file by the date group types. The start datetime The end of datetime Group types The interval Indicates whether adding a new field to the pivottable. Only for the first group item. False means this field could not be grouped by date time. Group the file by number. The start value The end of value The interval Indicates whether adding a new field to the pivottable False means this field could not be grouped by date time. Custom group the field. The custom group items. Indicates whether adding a new field to the pivottable False means this field could not be grouped by date time. Ungroup the pivot field. Gets the pivot filter of the pivot field by type Gets the pivot filters of the pivot field NOTE: This method is now obsolete. Instead, please use PivotField.GetFilters() method. This method will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced. Gets all pivot filters of this pivot field. Clears filter setting on this pivot field. Filters by values of data pivot field. The index of data field in the data region. The type of filtering data. Only can be Count,Sum and Percent. Indicates whether filter from top or bottom The item count Filters by values of data pivot field. The index of value field in the value region. The type of filtering data. The value of filter condition The upper-bound value of between filter condition Filters by captions of row or column pivot field. The type of filtering data. The label of filter condition The upper-bound label of between filter condition Filters by date setting of row or column pivot field. The type of filtering data. The date label of filter condition The upper-bound date label of between filter condition Indicates whether the specified PivotTable field is calculated field. Get the formula string of the specified calculated field . NOTE: This method is now obsolete. Instead, please use PivotField.GetFormula() method. This method will be removed 12 months later since August 2024. Aspose apologizes for any inconvenience you may have experienced. Gets formula of the calculated field . Indicates whether this field represents values fields. Represents the PivotField index in the base PivotFields. Represents the index of in the region. Specifies the region of the PivotTable that this field is displayed. Represents the name of PivotField. Represents the PivotField display name. Sets whether the specified field shows that subtotals. subtotals type. whether the specified field shows that subtotals. Indicates whether showing specified subtotal. subtotal type. Returns whether showing specified subtotal. Indicates whether the specified field shows automatic subtotals. Default is true. Indicates whether the specified field can be dragged to the column position. The default value is true. Indicates whether the specified field can be dragged to the hide position. The default value is true. Indicates whether the specified field can be dragged to the row position. The default value is true. Indicates whether the specified field can be dragged to the page position. The default value is true. Indicates whether the specified field can be dragged to the data position. The default value is true. indicates whether the field can have multiple items selected in the page field The default value is false. Indicates whether repeating labels of the field in the region. The default value is false. Indicates whether including new items to the field in manual filter. The default value is false. Indicates whether inserting page breaks after each item. The default value is false. Indicates whether all items displays in the PivotTable report, even if they don't contain summary data. show items with no data The default value is false. Sorts this pivot field. The type of sorting this field. The index of pivot field sorted by. -1 means sorting by data labels of this field, others mean the index of data field sorted by. Sorts this pivot field. The type of sorting this field. The index of pivot field sorted by. -1 means sorting by data labels of this field, others mean the index of data field sorted by. The type of data sorted by. Sort by values in the row or column Indicates whether a sort operation that will be applied to this pivot field is an autosort operation or a simple data sort. Indicates whether the specified PivotTable field is automatically sorted. Indicates whether the specified PivotTable field is autosorted ascending. Gets all settings of auto sorting Represents the index of field which is auto sorted. -1 means PivotField itself,others means the position of the data fields. Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003. Indicates whether the specified PivotTable field is autoshown ascending. Represent the number of top or bottom items that are automatically shown in the specified PivotTable field. Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields. Represents the function used to summarize the PivotTable data field. Shows values of data field as different display format when the ShowDataAs calculation is in use. The data display format type. The index to the field which ShowDataAs calculation bases on. The position type of base iteam. The index to the base item which ShowDataAs calculation bases on. Only works when baseItemPositionType is custom. Only for data field. Gets the settings of showing values as when the ShowDataAs calculation is in use. Represents how to display the values in a data field of the pivot report. NOTE: This property is now obsolete. Instead, please use PivotField.ShowValuesSetting.CalculationType property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced. Represents the base field for a custom calculation when the ShowDataAs calculation is in use. NOTE: This property is now obsolete. Instead, please use PivotField.ShowValuesSetting.BaseFieldIndex property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced. Represents the item in the base field for a custom calculation when the ShowDataAs calculation is in use. Valid only for data fields. Because PivotItemPosition.Custom is only for read,if you need to set PivotItemPosition.Custom, please set PivotField.BaseItemIndex attribute. NOTE: This property is now obsolete. Instead, please use PivotField.ShowValuesSetting.BaseItemPositionType property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced. Represents the item in the base field for a custom calculation when the ShowDataAs calculation is in use. Valid only for data fields. NOTE: This property is now obsolete. Instead, please use PivotField.ShowValuesSetting.BaseItemIndex property instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced. Represents the current page item showing for the page field (valid only for page fields). Represents the built-in display format of numbers and dates. Indicates whether inserting blank line after each item. when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom Only works when ShowInOutlineForm is true. Indicates whether layout this field in outline form on the Pivot Table view Represents the custom display format of numbers and dates. Gets whether the specific PivotItem is hidden. The index of the pivotItem in the pivotField. whether the specific PivotItem is hidden Sets whether the specific PivotItem in a data field is hidden. the index of the pivotItem in the pivotField. whether the specific PivotItem is hidden Gets whether hidding the detail of the specific PivotItem.. The index of the pivotItem in the pivotField. whether the specific PivotItem is hidden detail Sets whether the specific PivotItem in a pivot field is hidden detail. the index of the pivotItem in the pivotField. whether the specific PivotItem is hidden Sets whether the PivotItems in a pivot field is hidden detail.That is collapse/expand this field. Whether hide the detail of the pivot field. Sets whether the specific PivotItem in a data field is hidden. the value of the pivotItem in the pivotField. whether the specific PivotItem is hidden Get all labels of pivot items in this field. Get the original base items; Gets the count of the base items in this pivot field. Add a calculated formula item to the pivot field. The item's name. The formula of pivot item. Only supports to add calculated item to Row/Column field. Indicates whether display labels from the next field in the same column on the Pivot Table view Represents a collection of all the PivotField objects in the PivotTable's specific PivotFields type. Gets the PivotFields type. Gets the count of the pivotFields. Gets an enumerator over the elements in this collection in proper sequence. enumerator Gets the PivotField Object at the specific index. Gets the PivotField Object of the specific name. Adds a PivotField Object to the specific type PivotFields. field index in the base PivotFields. the index of the PivotField Object in this PivotFields. Adds a PivotField Object to the specific type PivotFields. a PivotField Object. the index of the PivotField Object in this PivotFields. clear all fields of PivotFieldCollection Moves the PivotField from current position to destination position Current position of PivotField based on zero Destination position of PivotField based on zero Represents the group setting of pivot field. Gets the group type of pivot field. Represents the group type of pivot field. No group Grouped by DateTime range. Grouped by numberic range. Grouped by discrete points. Represents the setting of sorting pivot fields. Represents the . Indicates whether sorting the field by itself or data field. Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field. The pivot line type sorted by. Only works when not sorting this field by labels. Indicates whether a simple data sort operation will be applied. The default value is true. Sorts by the values in which row or column. Summary description for PivotFieldSubtotalType. Represents None subtotal type. Represents Automatic subtotal type. Represents Sum subtotal type. Represents Count subtotal type. Represents Average subtotal type. Represents Max subtotal type. Represents Min subtotal type. Represents Product subtotal type. Represents Count Nums subtotal type. Represents Stdev subtotal type. Represents Stdevp subtotal type. Represents Var subtotal type. Represents Varp subtotal type. Represents PivotTable field type. Presents base pivot field type. Presents row pivot field type. Presents column pivot field type. Presents page pivot field type. Presents data pivot field type. Represents a PivotFilter in PivotFilter Collection. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; cells[5, 0].Value = "grape"; cells[6, 0].Value = "blueberry"; cells[7, 0].Value = "kiwi"; cells[8, 0].Value = "cherry"; cells[0, 1].Value = "year"; cells[1, 1].Value = 2020; cells[2, 1].Value = 2020; cells[3, 1].Value = 2020; cells[4, 1].Value = 2020; cells[5, 1].Value = 2021; cells[6, 1].Value = 2021; cells[7, 1].Value = 2021; cells[8, 1].Value = 2021; cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; cells[5, 2].Value = 90; cells[6, 2].Value = 100; cells[7, 2].Value = 110; cells[8, 2].Value = 120; PivotTableCollection pivots = sheet.PivotTables; int pivotIndex = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "year"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; //Add top 10 filter pivot.BaseFields[0].FilterTop10(0, PivotFilterType.Count,false,2); pivot.RefreshData(); pivot.CalculateData(); //do your business book.Save("out.xlsx"); [Visual Basic] Dim book As Workbook = New Workbook() Dim sheet As Worksheet = book.Worksheets(0) Dim cells As Cells = sheet.Cells cells(0, 0).Value = "fruit" cells(1, 0).Value = "grape" cells(2, 0).Value = "blueberry" cells(3, 0).Value = "kiwi" cells(4, 0).Value = "cherry" cells(5, 0).Value = "grape" cells(6, 0).Value = "blueberry" cells(7, 0).Value = "kiwi" cells(8, 0).Value = "cherry" cells(0, 1).Value = "year" cells(1, 1).Value = 2020 cells(2, 1).Value = 2020 cells(3, 1).Value = 2020 cells(4, 1).Value = 2020 cells(5, 1).Value = 2021 cells(6, 1).Value = 2021 cells(7, 1).Value = 2021 cells(8, 1).Value = 2021 cells(0, 2).Value = "amount" cells(1, 2).Value = 50 cells(2, 2).Value = 60 cells(3, 2).Value = 70 cells(4, 2).Value = 80 cells(5, 2).Value = 90 cells(6, 2).Value = 100 cells(7, 2).Value = 110 cells(8, 2).Value = 120 Dim pivots As PivotTableCollection = sheet.PivotTables Dim pivotIndex As Int32 = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable") Dim pivot As PivotTable = pivots(pivotIndex) pivot.AddFieldToArea(PivotFieldType.Row, "fruit") Pivot.AddFieldToArea(PivotFieldType.Column, "year") Pivot.AddFieldToArea(PivotFieldType.Data, "amount") pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10 'Add PivotFilter pivot.BaseFields(0).Filter.FilterTop10(0, PivotFilterType.Count,false,2) pivot.RefreshData() pivot.CalculateData() book.Save("out_vb.xlsx") Indicates whether uses whole days in its filtering criteria. Gets the autofilter of the pivot filter. NOTE: This method is now obsolete. Instead, please use FilterLabel, FilterValue,FilterDate or FilterTop10 method. This method will be removed 12 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the autofilter type of the pivot filter. Gets the index of source field which this pivot filter is applied to. Gets top 10 setting of the filter. Gets labels of the caption filter. Gets values of the number filter. Gets values of the number filter. Gets the category of this filter. Gets the string value1 of the label pivot filter. Gets the string value2 of the label pivot filter. Gets the measure field index of the pivot filter. NOTE: This method is now obsolete. Instead, please use PivotFilter.ValueFieldIndex property. This method will be removed 12 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the index of value field in the value region. Specifies the index of the measure cube field. this property is used only by filters in OLAP pivots and specifies on which measure a value filter should apply. Gets the member property field index of the pivot filter. Gets the name of the pivot filter. Gets the Evaluation Order of the pivot filter. Represents a collection of all the PivotFilter objects Gets the pivotfilter object at the specific index. Adds a PivotFilter Object to the specific type the PivotField index the PivotFilter type the index of the PivotFilter Object in this PivotFilterCollection. NOTE: This method is now obsolete. Instead, please use PivotFilterCollection.AddValueFilter(),AddTop10Filter(),AddLabelFilter() and AddDateFilter() methods. This method will be removed 12 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Filters by values of data pivot field. The index of field in the source. The index of data field in the data region. The type of filtering data. Only can be Count,Sum and Percent. Indicates whether filter from top or bottom The item count Filters by values of data pivot field. The index of field in the source. The index of value field in the value region. The type of filtering data. The value of filter condition The upper-bound value of between filter condition Filters by captions of row or column pivot field. The index of field in the source. The type of filtering data. The label of filter condition The upper-bound label of between filter condition Filters by date setting of row or column pivot field. The index of field in the source. The type of filtering data. The date label of filter condition The upper-bound date label of between filter condition Clear PivotFilter from the specific PivotField the PivotField index Represents PivotTable Filter type. Indicates the "begins with" filter for field captions. Indicates the "is between" filter for field captions. Indicates the "contains" filter for field captions. Indicates the "ends with" filter for field captions. Indicates the "equal" filter for field captions. Indicates the "is greater than" filter for field captions. Indicates the "is greater than or equal to" filter for field captions. Indicates the "is less than" filter for field captions. Indicates the "is less than or equal to" filter for field captions. Indicates the "does not begin with" filter for field captions. Indicates the "is not between" filter for field captions. Indicates the "does not contain" filter for field captions. Indicates the "does not end with" filter for field captions. Indicates the "not equal" filter for field captions. Indicates the "count" filter. Indicates the "between" filter for date values. Indicates the "equals" filter for date values. Indicates the "after" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "after" filter for date values. Indicates the "after or equal to" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "after or equal to" filter for date values. Indicates the "not between" filter for date values. Indicates the "does not equal" filter for date values. Indicates the "before" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "before" filter for date values. Indicates the "before or equal to" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "before or equal to" filter for date values. Indicates the "last month" filter for date values. Indicates the "last quarter" filter for date values. Indicates the "last week" filter for date values. Indicates the "last year" filter for date values. Indicates the "January" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "January" filter for date values. Indicates the "February" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "February" filter for date values. Indicates the "March" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "March" filter for date values. Indicates the "April" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "April" filter for date values. Indicates the "May" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "May" filter for date values. Indicates the "June" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "June" filter for date values. Indicates the "July" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "July" filter for date values. Indicates the "August" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "August" filter for date values. Indicates the "September" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "September" filter for date values. Indicates the "October" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "October" filter for date values. Indicates the "November" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "November" filter for date values. Indicates the "December" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "December" filter for date values. Indicates the "next month" filter for date values. Indicates the "next quarter" for date values. Indicates the "next week" for date values. Indicates the "next year" filter for date values. Indicates the "percent" filter for numeric values. Indicates the "first quarter" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "first quarter" filter for date values. Indicates the "second quarter" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "second quarter" filter for date values. Indicates the "third quarter" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "third quarter" filter for date values. Indicates the "fourth quarter" filter for date values. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates the "fourth quarter" filter for date values. Indicates the "sum" filter for numeric values. Indicates the "this month" filter for date values. Indicates the "this quarter" filter for date values. Indicates the "this week" filter for date values. Indicate the "this year" filter for date values. Indicates the "today" filter for date values. Indicates the "tomorrow" filter for date values. Indicates the PivotTable filter is unknown to the application. Indicates the "Value between" filter for text and numeric values. Indicates the "value equal" filter for text and numeric values. Indicates the "value greater than" filter for text and numeric values. Indicates the "value greater than or equal to" filter for text and numeric values. Indicates the "value less than" filter for text and numeric values. Indicates the "value less than or equal to" filter for text and numeric values. Indicates the "value not between" filter for text and numeric values. Indicates the "value not equal" filter for text and numeric values. Indicates the "year-to-date" filter for date values. Indicates the "yesterday" filter for date values. No filter. Represents a item in a PivotField report. Gets and Sets whether the pivot item is hidden. Specifying the position index in all the PivotItems,not the PivotItems under the same parent node. Specifying the position index in the PivotItems under the same parent node. Moves the item up or down The number of moving up or down. Move the item up if this is less than zero; Move the item down if this is greater than zero. Specifying whether moving operation is in the same parent node or not Gets and sets whether the pivot item hides detail. NOTE: This property is now obsolete. Instead, please use PivotItem.IsDetailHidden property instead. This property will be removed 12 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Gets and sets whether the detail of this pivot item is hidden. Indicates whether this pivot item is a calculated formula item. Indicates whether this pivot item is a calculated formula item. NOTE: This property is now obsolete. Instead, please use PivotItem.IsCalculatedItem property instead. This property will be removed 12 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the formula of this calculated item. Only works when this item is calculated item. Indicates whether the item is removed from the data source. True means this value has benn removed from the data source. Gets the string value of the pivot item If the value is null, it will return "" Gets the double value of the pivot item If the value is null or not number ,it will return 0 Gets the date time value of the pivot item If the value is null ,it will return DateTime.MinValue Gets the value of the pivot item Gets the name of the pivot item. Gets the index of the pivot item in cache field. Represents all the objects in the PivotField. Gets an enumerator over the elements in this collection in proper sequence. enumerator Gets the PivotItem Object at the specific index. Gets the by the specific name. Gets the count of the pivot items. Directly changes the orders of the two items. The current index The dest index NOTE: This method is now obsolete. Instead, please use PivotItemCollection.SwapItem() method. This method will be removed 12 months later since July 2024. Aspose apologizes for any inconvenience you may have experienced. Directly swap two items. Represents base item Next/Previous/All position in the base field . NOTE: This enum is now obsolete. Instead, please use PivotItemPositionType enum instead. This method will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced. Represents the previous pivot item in the PivotField. Represents the next pivot item in the PivotField. Shows values as the different format based the index of pivot item in the PivotField. Only for getting. Represents the position type of the pivot base item in the base field when the ShowDataAs calculation is in use. Represents the previous pivot item in the PivotField. Represents the next pivot item in the PivotField. Shows values as the different format based the index of pivot item in the PivotField. Only for getting. Specifies the type of the PivotLine. Regular PivotLine with pivot items. Subtotal line. Grand Total line. Blank line after each group. Represents number of items to retain per field. The default number of unique items per PivotField allowed. The maximum number of unique items per PivotField allowed (>32,500). No unique items per PivotField allowed. Represents the numberic range group of the pivot field. Gets the group type. Gets the start number of the group. Gets the end number of the group. Gets the interval of the group. Represents the pivot page field items if the pivot table data source is consolidation ranges. It only can contain up to 4 fields. Represents the pivot page field items. Adds a page field. Page field item label Gets the number of page fields. Sets which item label in each page field to use to identify the data range. The pageItemIndex.Length must be equal to PageFieldCount, so please add the page field first. The consolidation data range index. The page item index in the each page field. pageItemIndex[2] = 1 means the second item in the third field to use to identify this range. pageItemIndex[1] = -1 means no item in the second field to use to identify this range and MS will auto create "blank" item in the second field to identify this range. The state for refreshing pivot tables. Successfully refreshed Refresh failed because the data source is external. Represents the settings about showing values as when the ShowDataAs calculation is in use. Represents how to show values of a data field in the pivot report. Represents the base field for a ShowDataAs calculation when the ShowDataAs calculation is in use. Represents type of the base pivot item in the base field when the ShowDataAs calculation is in use. Valid only for data fields. Because PivotItemPosition.Custom is only for read,if you need to set PivotItemPosition.Custom, please set PivotField.BaseItemIndex attribute. Represents the custom index of the pivot item in the base field when the ShowDataAs calculation is in use. Valid only for data fields. Summary description for PivotTable. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; cells[5, 0].Value = "grape"; cells[6, 0].Value = "blueberry"; cells[7, 0].Value = "kiwi"; cells[8, 0].Value = "cherry"; cells[0, 1].Value = "year"; cells[1, 1].Value = 2020; cells[2, 1].Value = 2020; cells[3, 1].Value = 2020; cells[4, 1].Value = 2020; cells[5, 1].Value = 2021; cells[6, 1].Value = 2021; cells[7, 1].Value = 2021; cells[8, 1].Value = 2021; cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; cells[5, 2].Value = 90; cells[6, 2].Value = 100; cells[7, 2].Value = 110; cells[8, 2].Value = 120; PivotTableCollection pivots = sheet.PivotTables; int pivotIndex = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "year"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; //Change PivotField's attributes PivotField rowField = pivot.RowFields[0]; rowField.DisplayName = "custom display name"; //Add PivotFilter int index = pivot.PivotFilters.Add(0, PivotFilterType.Count); PivotFilter filter = pivot.PivotFilters[index]; filter.AutoFilter.FilterTop10(0, false, false, 2); //Add PivotFormatCondition int formatIndex = pivot.PivotFormatConditions.Add(); PivotFormatCondition pfc = pivot.PivotFormatConditions[formatIndex]; FormatConditionCollection fcc = pfc.FormatConditions; fcc.AddArea(pivot.DataBodyRange); int idx = fcc.AddCondition(FormatConditionType.CellValue); FormatCondition fc = fcc[idx]; fc.Formula1 = "100"; fc.Operator = OperatorType.GreaterOrEqual; fc.Style.BackgroundColor = Color.Red; pivot.RefreshData(); pivot.CalculateData(); //do your business book.Save("out.xlsx"); [Visual Basic] Dim book As Workbook = New Workbook() Dim sheet As Worksheet = book.Worksheets(0) Dim cells As Cells = sheet.Cells cells(0, 0).Value = "fruit" cells(1, 0).Value = "grape" cells(2, 0).Value = "blueberry" cells(3, 0).Value = "kiwi" cells(4, 0).Value = "cherry" cells(5, 0).Value = "grape" cells(6, 0).Value = "blueberry" cells(7, 0).Value = "kiwi" cells(8, 0).Value = "cherry" cells(0, 1).Value = "year" cells(1, 1).Value = 2020 cells(2, 1).Value = 2020 cells(3, 1).Value = 2020 cells(4, 1).Value = 2020 cells(5, 1).Value = 2021 cells(6, 1).Value = 2021 cells(7, 1).Value = 2021 cells(8, 1).Value = 2021 cells(0, 2).Value = "amount" cells(1, 2).Value = 50 cells(2, 2).Value = 60 cells(3, 2).Value = 70 cells(4, 2).Value = 80 cells(5, 2).Value = 90 cells(6, 2).Value = 100 cells(7, 2).Value = 110 cells(8, 2).Value = 120 Dim pivots As PivotTableCollection = sheet.PivotTables Dim pivotIndex As Int32 = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable") Dim pivot As PivotTable = pivots(pivotIndex) pivot.AddFieldToArea(PivotFieldType.Row, "fruit") Pivot.AddFieldToArea(PivotFieldType.Column, "year") Pivot.AddFieldToArea(PivotFieldType.Data, "amount") pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10 'Change PivotField's attributes Dim rowField As PivotField = pivot.RowFields(0) rowField.DisplayName = "custom display name" 'Add PivotFilter Dim filterIndex As Int32 = pivot.PivotFilters.Add(0, PivotFilterType.Count) Dim filter As PivotFilter = pivot.PivotFilters(filterIndex) filter.AutoFilter.FilterTop10(0, False, False, 2) 'Add PivotFormatCondition Dim formatIndex As Int32 = pivot.PivotFormatConditions.Add() Dim pfc As PivotFormatCondition = pivot.PivotFormatConditions(formatIndex) Dim fcc As FormatConditionCollection = pfc.FormatConditions fcc.AddArea(pivot.DataBodyRange) Dim idx As Int32 = fcc.AddCondition(FormatConditionType.CellValue) Dim fc As FormatCondition = fcc(idx) fc.Formula1 = "100" fc.Operator = OperatorType.GreaterOrEqual fc.Style.BackgroundColor = Color.Red pivot.RefreshData() pivot.CalculateData() book.Save("out_vb.xlsx") Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Specifies whether the PivotTable is compatible for Excel2003 when refreshing PivotTable, if true, a string must be less than or equal to 255 characters, so if the string is greater than 255 characters, it will be truncated. if false, a string will not have the aforementioned restriction. The default value is true. Gets the name of the last user who refreshed this PivotTable Gets the last date time when the PivotTable was refreshed. Gets and sets the pivottable style name. Gets and sets the built-in pivot table style. Copies named style from another pivot table. Source pivot table. Show all the report filter pages according to PivotField, the PivotField must be located in the PageFields. The PivotField object Show all the report filter pages according to PivotField's name, the PivotField must be located in the PageFields. The name of PivotField Show all the report filter pages according to the position index in the PageFields The position index in the PageFields Removes a field from specific field area The fields area type. The name in the base fields. Removes a field from specific field area The fields area type. The field index in the base fields. Remove field from specific field area the fields area type. the field in the base fields. Adds the field to the specific area. The fields area type. The name in the base fields. The field position in the specific fields.If there is no field named as it, return -1. Adds the field to the specific area. The fields area type. The field index in the base fields. The field position in the specific fields. Adds the field to the specific area. the fields area type. the field in the base fields. the field position in the specific fields. Adds a calculated field to pivot field. The name of the calculated field The formula of the calculated field. True,drag this field to data area immediately Adds a calculated field to pivot field and drag it to data area. The name of the calculated field The formula of the calculated field. Gets the specific pivot field list by the region. the region type. the specific pivot field collection Gets the specific fields by the field type. the field type. the specific field collection NOTE: This method is now obsolete. Instead, please use PivotField.GetFields() method. This method will be removed 12 months later since May 2024. Aspose apologizes for any inconvenience you may have experienced. Returns a PivotFields object that are currently shown as column fields. Returns a PivotFields object that are currently shown as row fields. Returns a PivotFields object that are currently shown as page fields. Gets a PivotField object that represents all the data fields in a PivotTable. Read-only.It would be init only when there are two or more data fields in the DataPiovtFiels. It only use to add DataPivotField to the PivotTable row/column area . Default is in row area. Gets a object that represents all the data fields in a PivotTable. Read-only. It would only be created when there are two or more data fields in the Data region. Defaultly it is in row region. You can drag it to the row/column region with PivotTable.AddFieldToArea() method . Returns all base pivot fields in the PivotTable. Returns all filters of pivot fields in the pivot table. Returns a CellArea object that represents the range that contains the column area in the PivotTable report. Read-only. Returns a CellArea object that represents the range that contains the row area in the PivotTable report. Read-only. Returns a object that represents the range that contains the data area in the list between the header row and the insert row. Read-only. Returns a CellArea object that represents the range containing the entire PivotTable report, but doesn't include page fields. Read-only. Returns a CellArea object that represents the range containing the entire PivotTable report, includes page fields. Read-only. Moves the PivotTable to a different location in the worksheet. row index. column index. NOTE: This property is now obsolete. Instead, please use PivotTable.MoveTo() method. This method will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Moves the PivotTable to a different location in the worksheet. the dest cell name. NOTE: This property is now obsolete. Instead, please use PivotTable.MoveTo() method. This method will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Moves the PivotTable to a different location in the worksheet. row index. column index. Moves the PivotTable to a different location in the worksheet. the dest cell name. Indicates whether the PivotTable report displays classic pivottable layout. (enables dragging fields in the grid) Indicates whether to show grand totals for columns of this pivot table. Indicates whether to show grand totals for rows of the pivot table. Indicates whether the PivotTable report shows grand totals for columns. NOTE: This property is now obsolete. Instead, please use PivotTable.ShowColumnGrandTotals method. This method will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates whether to show grand totals for rows of this pivot table. NOTE: This property is now obsolete. Instead, please use PivotTable.ShowRowGrandTotals method. This method will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates whether the PivotTable report displays a custom string if the value is null. Gets the string displayed in cells that contain null values when the DisplayNullString property is true.The default value is an empty string. Indicates whether the PivotTable report displays a custom string in cells that contain errors. Gets and sets the name of the value area field header in the PivotTable. Gets the string displayed in cells that contain errors when the DisplayErrorString property is true.The default value is an empty string. Indicates whether the PivotTable report is automatically formatted. Checkbox "autoformat table " which is in pivottable option for Excel 2003 Indicates whether autofitting column width on update Gets and sets the auto format type of PivotTable. Indicates whether to add blank rows. This property only applies for the PivotTable auto format types which needs to add blank rows. True if the specified PivotTable report's outer-row item, column item, subtotal, and grand total labels use merged cells. Indicates whether formatting is preserved when the PivotTable is refreshed or recalculated. Gets and sets whether showing expand/collapse buttons. Gets whether drilldown is enabled. Indicates whether the PivotTable Field dialog box is available when the user double-clicks the PivotTable field. Indicates whether the field list for the PivotTable is available on the view of Excel. Indicates whether the PivotTable Wizard is available. Indicates whether hidden page field items in the PivotTable report are included in row and column subtotals, block totals, and grand totals. The default value is False. Returns the label that is displayed in the grand total column or row heading. The default value is the string "Grand Total". Indicates whether the PivotTable report is recalculated only at the user's request. Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them. NOTE: This property is now obsolete. Instead, please use PivotTable.AllowMultipleFiltersPerField property. This method will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them. Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them. Specifies a boolean value that indicates whether the user is allowed to edit the cells in the data area of the pivottable. Enable cell editing in the values area Specifies a boolean value that indicates whether tooltips should be displayed for PivotTable data cells. Specifies a boolean value that indicates whether member property information should be omitted from PivotTable tooltips. Indicates whether showing values row. Indicates whether to include empty columns in the table Indicates whether to include empty rows in the table. Indicates whether fields in the PivotTable are sorted in non-default order in the field list. Specifies a boolean value that indicates whether drill indicators should be printed. print expand/collapse buttons when displayed on pivottable. Gets and sets the title of the alter text. Gets the description of the alt text. Gets the name of the PivotTable Gets the Column Header Caption of the PivotTable. Specifies the indentation increment for compact axis and can be used to set the Report Layout to Compact Form. Gets the Row Header Caption of the PivotTable. Indicates whether row header caption is shown in the PivotTable report Indicates whether Display field captions and filter drop downs Indicates whether consider built-in custom list when sort data Gets the Format Conditions of the pivot table. NOTE: This property is now obsolete. Instead, please use PivotTable.ConditionalFormats property. This method will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the conditional formats of the pivot table. Gets and sets the order in which page fields are added to the PivotTable report's layout. Gets the number of page fields in each column or row in the PivotTable report. Gets a string saved with the PivotTable report. Indicates whether data for the PivotTable report is saved with the workbook. Indicates whether Refresh Data when Opening File. Indicates whether Refreshing Data or not. NOTE: This method is now obsolete. Instead, This method will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the data source type of the pivot table. Gets the external connection data source. NOTE: This property is now obsolete. Instead, please use PivotTable.GetSourceDataConnections() method. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the external connection data sources. Gets the name of external source data connections. Gets and sets the data source of the pivot table. Set pivottable's source data. Get pivottable's source data. Get pivottable's source data. Indicates whether to return original or display data source Refreshes pivottable's data and setting from it's data source. We will gather data from data source to a pivot cache ,then calculate the data in the cache to the cells. This method is only used to gather all data to a pivot cache. Refreshes pivottable's data and setting from it's data source with options. The options for refreshing data source of pivot table. Calculates pivottable's data to cells. Cell.Value in the pivot range could not return the correct result if the method is not been called. This method calculates data with an inner pivot cache,not original data source. So if the data source is changed, please call RefreshData() method first. Calculating pivot tables with options Clear PivotTable's data and formatting If this method is not called before you add or delete PivotField, Maybe the PivotTable data is not corrected Calculates pivottable's range. If this method is not been called,maybe the pivottable range is not corrected. Format all the cell in the pivottable area Style which is to format Format the row data in the pivottable area Row Index of the Row object Style which is to format Formats selected area of the PivotTable. The selected pivot view area. The formatted setting. Formats selected area of the PivotTable. The range of the cells. The style Format the cell in the pivottable area Row Index of the cell Column index of the cell Style which is to format the cell Select an area of pivot table view. The cell area. Show the detail of one item in the data region to a new Table. Offset to the first data row in the data region. Offset to the first data column in the data region. Show the detail to a new worksheet. The target row. The target column. Gets the collection of formats applied to PivotTable. Indicates whether PivotItem names should be repeated at the top of each printed page. NOTE: This property is now obsolete. Instead, please use PivotTable.RepeatItemsOnEachPrintedPage property. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced. Indicates whether pivot item captions on the row area are repeated on each printed page for pivot fields in tabular form. Indicates whether the print titles for the worksheet are set based on the PivotTable report. The default value is false. Indicates whether items in the row and column areas are visible when the data area of the PivotTable is empty. The default value is true. Indicates whether this PivotTable is selected. Indicates whether the row header in the pivot table should have the style applied. Indicates whether the column header in the pivot table should have the style applied. Indicates whether row stripe formatting is applied. Indicates whether stripe formatting is applied for column. Indicates whether the column formatting is applied. Sets auto field group by the PivotTable. The row or column field index in the base fields NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Sets auto field group by the PivotTable. The row or column field in the specific fields NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Sets manual field group by the PivotTable. The row or column field index in the base fields Specifies the starting value for numeric grouping. Specifies the ending value for numeric grouping. Specifies the grouping type list. Specified by PivotTableGroupType Specifies the interval number group by numeric grouping. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Sets manual field group by the PivotTable. The row or column field in the base fields Specifies the starting value for numeric grouping. Specifies the ending value for numeric grouping. Specifies the grouping type list. Specified by PivotTableGroupType Specifies the interval number group by numeric grouping. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Sets manual field group by the PivotTable. The row or column field index in the base fields Specifies the starting value for date grouping. Specifies the ending value for date grouping. Specifies the grouping type list. Specified by PivotTableGroupType Specifies the interval number group by in days grouping.The number of days must be positive integer of nonzero NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Sets manual field group by the PivotTable. The row or column field in the base fields Specifies the starting value for date grouping. Specifies the ending value for date grouping. Specifies the grouping type list. Specified by PivotTableGroupType Specifies the interval number group by in days grouping.The number of days must be positive integer of nonzero NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Sets ungroup by the PivotTable The row or column field index in the base fields NOTE: This method is now obsolete. Instead, please use PivotField.Ungroup() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Sets ungroup by the PivotTable The row or column field in the base fields NOTE: This method is now obsolete. Instead, please use PivotField.Ungroup() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Gets horizontal page breaks of this pivot table. Gets pivot table row index list of horizontal page breaks NOTE: This method is now obsolete. Instead, please use PivotTable.GetHorizontalPageBreaks() method. This method will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Layouts the PivotTable in compact form. Layouts the PivotTable in outline form. Layouts the PivotTable in tabular form. Gets the object by the display name of PivotField. the DisplayName of PivotField the Cell object Gets the Children Pivot Tables which use this PivotTable data as data source. the PivotTable array object Rerepsents the options of calcuating the pivot table. Indicates whether refreshing data source of the pivottable. Indicates whether refreshing charts are based on this pivot table. Represents how to reserve missing pivot items. Only works when is true. Represents the collection of all the PivotTable objects on the specified worksheet. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; cells[5, 0].Value = "grape"; cells[6, 0].Value = "blueberry"; cells[7, 0].Value = "kiwi"; cells[8, 0].Value = "cherry"; cells[0, 1].Value = "year"; cells[1, 1].Value = 2020; cells[2, 1].Value = 2020; cells[3, 1].Value = 2020; cells[4, 1].Value = 2020; cells[5, 1].Value = 2021; cells[6, 1].Value = 2021; cells[7, 1].Value = 2021; cells[8, 1].Value = 2021; cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; cells[5, 2].Value = 90; cells[6, 2].Value = 100; cells[7, 2].Value = 110; cells[8, 2].Value = 120; PivotTableCollection pivots = sheet.PivotTables; int pivotIndex = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "year"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; //Change PivotField's attributes PivotField rowField = pivot.RowFields[0]; rowField.DisplayName = "custom display name"; //Add PivotFilter int index = pivot.PivotFilters.Add(0, PivotFilterType.Count); PivotFilter filter = pivot.PivotFilters[index]; filter.AutoFilter.FilterTop10(0, false, false, 2); //Add PivotFormatCondition int formatIndex = pivot.PivotFormatConditions.Add(); PivotFormatCondition pfc = pivot.PivotFormatConditions[formatIndex]; FormatConditionCollection fcc = pfc.FormatConditions; fcc.AddArea(pivot.DataBodyRange); int idx = fcc.AddCondition(FormatConditionType.CellValue); FormatCondition fc = fcc[idx]; fc.Formula1 = "100"; fc.Operator = OperatorType.GreaterOrEqual; fc.Style.BackgroundColor = Color.Red; pivot.RefreshData(); pivot.CalculateData(); //do your business book.Save("out.xlsx"); [Visual Basic] Dim book As Workbook = New Workbook() Dim sheet As Worksheet = book.Worksheets(0) Dim cells As Cells = sheet.Cells cells(0, 0).Value = "fruit" cells(1, 0).Value = "grape" cells(2, 0).Value = "blueberry" cells(3, 0).Value = "kiwi" cells(4, 0).Value = "cherry" cells(5, 0).Value = "grape" cells(6, 0).Value = "blueberry" cells(7, 0).Value = "kiwi" cells(8, 0).Value = "cherry" cells(0, 1).Value = "year" cells(1, 1).Value = 2020 cells(2, 1).Value = 2020 cells(3, 1).Value = 2020 cells(4, 1).Value = 2020 cells(5, 1).Value = 2021 cells(6, 1).Value = 2021 cells(7, 1).Value = 2021 cells(8, 1).Value = 2021 cells(0, 2).Value = "amount" cells(1, 2).Value = 50 cells(2, 2).Value = 60 cells(3, 2).Value = 70 cells(4, 2).Value = 80 cells(5, 2).Value = 90 cells(6, 2).Value = 100 cells(7, 2).Value = 110 cells(8, 2).Value = 120 Dim pivots As PivotTableCollection = sheet.PivotTables Dim pivotIndex As Int32 = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable") Dim pivot As PivotTable = pivots(pivotIndex) pivot.AddFieldToArea(PivotFieldType.Row, "fruit") Pivot.AddFieldToArea(PivotFieldType.Column, "year") Pivot.AddFieldToArea(PivotFieldType.Data, "amount") pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10 'Change PivotField's attributes Dim rowField As PivotField = pivot.RowFields(0) rowField.DisplayName = "custom display name" 'Add PivotFilter Dim filterIndex As Int32 = pivot.PivotFilters.Add(0, PivotFilterType.Count) Dim filter As PivotFilter = pivot.PivotFilters(filterIndex) filter.AutoFilter.FilterTop10(0, False, False, 2) 'Add PivotFormatCondition Dim formatIndex As Int32 = pivot.PivotFormatConditions.Add() Dim pfc As PivotFormatCondition = pivot.PivotFormatConditions(formatIndex) Dim fcc As FormatConditionCollection = pfc.FormatConditions fcc.AddArea(pivot.DataBodyRange) Dim idx As Int32 = fcc.AddCondition(FormatConditionType.CellValue) Dim fc As FormatCondition = fcc(idx) fc.Formula1 = "100" fc.Operator = OperatorType.GreaterOrEqual fc.Style.BackgroundColor = Color.Red pivot.RefreshData() pivot.CalculateData() book.Save("out_vb.xlsx") Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Adds a new PivotTable. The data for the new PivotTable cache. The cell in the upper-left corner of the PivotTable report's destination range. The name of the new PivotTable report. The new added cache index. Adds a new PivotTable. The data for the new PivotTable cache. The cell in the upper-left corner of the PivotTable report's destination range. The name of the new PivotTable report. Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory. The new added cache index. Adds a new PivotTable. The data cell range for the new PivotTable.Example : Sheet1!A1:C8 Row index of the cell in the upper-left corner of the PivotTable report's destination range. Column index of the cell in the upper-left corner of the PivotTable report's destination range. The name of the new PivotTable report. The new added cache index. Adds a new PivotTable. The data cell range for the new PivotTable.Example : Sheet1!A1:C8 Row index of the cell in the upper-left corner of the PivotTable report's destination range. Column index of the cell in the upper-left corner of the PivotTable report's destination range. The name of the new PivotTable report. Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory. The new added cache index. Adds a new PivotTable. The data cell range for the new PivotTable.Example : Sheet1!A1:C8 Row index of the cell in the upper-left corner of the PivotTable report's destination range. Column index of the cell in the upper-left corner of the PivotTable report's destination range. The name of the new PivotTable report. Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory. Indicates whether add classic pivot table of Excel 97-2003. The new added cache index. Adds a new PivotTable. The data cell range for the new PivotTable.Example : Sheet1!A1:C8 The cell in the upper-left corner of the PivotTable report's destination range. The name of the new PivotTable report. Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory. Indicates whether add classic pivot table of Excel 97-2003. The new added cache index. Adds a new PivotTable based on another PivotTable. The source pivotTable. The cell in the upper-left corner of the PivotTable report's destination range. The name of the new PivotTable report. The new added PivotTable index. Adds a new PivotTable based on another PivotTable. The source pivotTable. Row index of the cell in the upper-left corner of the PivotTable report's destination range. Column index of the cell in the upper-left corner of the PivotTable report's destination range. The name of the new PivotTable report. The new added PivotTable index. Adds a new PivotTable Object to the collection with multiple consolidation ranges as data source. The multiple consolidation ranges,such as {"Sheet1!A1:C8","Sheet2!A1:B8"} Whether auto create a single page field. If true,the following param pageFields will be ignored. The pivot page field items. destCellName The name of the new PivotTable report. the name of the new PivotTable report. The new added PivotTable index. Adds a new PivotTable Object to the collection with multiple consolidation ranges as data source. The multiple consolidation ranges,such as {"Sheet1!A1:C8","Sheet2!A1:B8"} Whether auto create a single page field. If true,the following param pageFields will be ignored The pivot page field items. Row index of the cell in the upper-left corner of the PivotTable report's destination range. Column index of the cell in the upper-left corner of the PivotTable report's destination range. The name of the new PivotTable report. The new added PivotTable index. Gets the PivotTable report by index. Gets the PivotTable report by pivottable's name. Gets the PivotTable report by pivottable's position. Clear all pivot tables. Deletes the specified PivotTable and delete the PivotTable data PivotTable object Deletes the specified PivotTable PivotTable object Whether to keep the PivotTable data Deletes the PivotTable at the specified index and delete the PivotTable data the position index in PivotTable collection Deletes the PivotTable at the specified index the position index in PivotTable collection Whether to keep the PivotTable data Represents the options of refreshing data source of the pivot table. Represents the options of refreshing data source of the pivot table. Represents how to reserve missing pivot items. Represents data source type of the pivot table. Specifies that the source data is a range. Specifies that external source data is used. Specifies that multiple consolidation ranges are used as the source data. The source data is populated from a temporary internal structure. Unknown data source. Represents how to keep the missing pivot items. Removes old missint pivot items and reserves visible items which the current data source does not contain as missing items. Reserves all missing items. Removes all missing pivot items. Represents Group Range in a PivotField. NOTE: This class is now obsolete. Instead, please use PivotFieldGroupSettings class. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Specifies a boolean value that indicates whether the application will use the source data to set the beginning range value. Specifies a boolean value that indicates whether the application will use the source data to set the end range value. Represents the start object for the group range. Represents the end object for the group range. Represents the interval object for the group range. Represents the group type for the group range. rangeofvalue Seconds Minutes Hours Days Months Quarters Years Represents type of copying format when inserting rows. Formats same as above row. Formats same as below row. Clears formatting. Represents the copy options. CopyOptions constructor. Indicates whether keeping macros; Only for copying workbook. Indicates whether extend ranges when copying the range to adjacent range. If it's true, only extends the range of the hyperlink,not adding a new hyperlink when copying hyperlinks to adjacent rows. Indicates whether copying the names. If the formula is not valid for the dest destination, only copy values. Indicates whether copying column width in unit of characters. In ms excel, when copying formulas which refer to other worksheets while copying a worksheet to another one, the copied formulas should refer to source workbook. However, for some situations user may need the copied formulas refer to worksheets with the same name in the same workbook, such as when those worksheets have been copied before this copy operation, then this property should be kept as true. The default value is true. When copying the range in the same file and the chart refers to the source sheet, False means the copied chart's data source will not be changed. True means the copied chart's data source refers to the destination sheet. The default value is false, it works as MS Excel. Represents the setting of deleting blank cells/rows/columns. Whether one cell will be taken as blank when its value is empty string. Default value is true. Whether one cell will be taken as blank when it is formula and the calculated result is null or empty string. Default value is false. Generally user should make sure the formulas have been calculated before deleting operation with this property as true. Otherwise all newly cretaed formulas by normal apis such as will be taken as blank and may be deleted because before calculation their calculated results are all null. Whether drawing related objects such as picture, shape, chart... will be taken as blank. Default value is true. When setting this property as false, all rows/columns covered by drawing objects will not be taken as blank and will not be deleted. Indicates how to process merged cells when deleting blank rows/columns. For , all cells in it will be taken as blank except the non-blank top-left cell. It is the default value of this property.

For , all cells in it will be taken as non-blank.

For , all cells outside the content display area will be taken as blank.

Specifies the start row/column index of the range to check and delete blank rows/columns. Specifies the end row/column index(inclusive) of the range to check and delete blank rows/columns. Default value is -1 and -1 means the maximum range of all objects(cells, drawings, ...) that need to be checked. Represents the setting of deleting rows/columns. Indicates if update references in other worksheets. Gets/sets the monitor for tracking changes caused by the deletion. Represents find options. [C#] //Instantiate the workbook object Workbook workbook = new Workbook("book1.xls"); //Get Cells collection Cells cells = workbook.Worksheets[0].Cells; //Instantiate FindOptions Object FindOptions findOptions = new FindOptions(); //Create a Cells Area CellArea ca = new CellArea(); ca.StartRow = 8; ca.StartColumn = 2; ca.EndRow = 17; ca.EndColumn = 13; //Set cells area for find options findOptions.SetRange(ca); //Set searching properties findOptions.SearchBackward = false; findOptions.SeachOrderByRows = true; findOptions.LookInType = LookInType.Values; //Find the cell with 0 value Cell cell = cells.Find(0, null, findOptions); [VB.NET] 'Instantiate the workbook object Dim workbook As New Workbook("book1.xls") 'Get Cells collection Dim cells As Cells = workbook.Worksheets(0).Cells 'Instantiate FindOptions Object Dim findOptions As New FindOptions() 'Create a Cells Area Dim ca As New CellArea() ca.StartRow = 8 ca.StartColumn = 2 ca.EndRow = 17 ca.EndColumn = 13 'Set cells area for find options findOptions.SetRange(ca) 'Set searching properties findOptions.SearchBackward = True findOptions.SeachOrderByRows = True findOptions.LookInType = LookInType.Values 'Find the cell with 0 value Dim cell As Cell = cells.Find(0, Nothing, findOptions) Indicates if the searched string is case sensitive. NOTE: This member is now obsolete. Instead, please use FindOptions.CaseSensitive property. This property will be removed 12 months later since June 2010. Aspose apologizes for any inconvenience you may have experienced. Indicates if the searched string is case sensitive. Look at type. When is true and user has specified the exact rule for the regex, for performance consideration this property should be set as . Otherwise we will refactor the search key to ensure it can be matched according to the specific type. For example, when the type is (this is the default value for this property), we will add wildcards at the beginning and end of the search key automatically. In this case, the regular expressions will become more complex and the performance will also decrease. Gets and sets the searched range. Returns the searched range. Sets the searched range. the searched range. Indicates whether the searched range is set. Search order. True: search next. False: search previous. NOTE: This member is now obsolete. Instead, please use FindOptions.SearchBackward property. This property will be removed 12 months later since November 2018. Aspose apologizes for any inconvenience you may have experienced. Whether search backward for cells. Indicates whether search order by rows or columns. NOTE: This member is now obsolete. Instead, please use FindOptions.SearchOrderByRows property. This property will be removed 12 months later since November 2018. Aspose apologizes for any inconvenience you may have experienced. Indicates whether search order by rows or columns. Look in type. Indicates whether the searched key is regex. If true the searched key will be taken as regex and parsed. Otherwise the key will be parsed according to the rules in ms excel. Even though the search key has been specified as regex, it may be refactored according to specified . For example, when the type is (this is the default value for this options), wildcards will be added at the beginning and end of the search key automatically to ensure the match will be checked as "contains". In this case, the regular expressions will become more complex and the performance will also decrease. So, for performance consideration, if user has specified the exact rule for the regex, then there is no need to use as additional constraint and user may set it as to get better performance. Indicates whether searched cell value type should be same with the searched key. The format to search for. Gets or sets a value that indicates whether converting the searched string value to numeric data. Represents the options of inserting. Indicates if references in other worksheets will be updated. Gets/sets the monitor for tracking changes caused by the insertion. Represents look at type. Cell value Contains the find object. Cell value Starts with the find object. Cell value ends with the find object. Cell value is same as the find object. Represents look in type. Finds the searched object from formula() if the cell is formula, otherwise finds from cell's original value(same with ). Finds object from cell's original value() and formatted value(). Ignores cells that are formula. For those cells that are not formula, it is same with . Finds object from cell's comment only. Ignores those cells that have no comment. Ignores cells that are not formula. For those cells that are formula, finds the searched object from formula(). Find object from cell's original value only. Find object from cell's formatted value() only. Represents the strategy to shrink merged cells for operations such as deleting blank rows/column. Leaves the merged cells as it is without any modification. Shrinks the merged area if needed, by removing rows from the bottom or columns from the right, while ensuring all content remains visible. Only keeps the header rows/columns of the merged area when the top-left cell of the merged area is not blank. Represents the paste special options. The paste special type. Indicates whether skips blank cells. True means only copying visible cells. True to transpose rows and columns when the range is pasted. The default value is False. Gets and sets the operation type when pasting range. Ingore links to the original file. Represents the paste special type. Copies all data of the range. It works as "All" behavior of MS Excel. Copies all data of the range without the range. It works as "All except borders" behavior of MS Excel. Only copies the widths of the range. Only copies the heights of the range. Represent the replace options. Indicates if the searched string is case sensitive. Indicates whether to match entire cells contents The default value is true. Indicates whether the searched key is regex. If true then the searched key will be taken as regex. The rich formatted settings for the replaced text. Gets and sets flags of applying font settings. Represents Excel country identifiers. United States Canada Latin America, except Brazil Russia Egypt Greece Netherlands Belgium France Spain Hungary Italy Switzerland Austria United Kingdom Denmark Sweden Norway Poland Germany Mexico Brazil Australia New Zealand Thailand Japan SouthKorea Viet Nam People's Republic of China Turkey India Algeria Morocco Libya Portugal Iceland Finland Czech Republic Taiwan Lebanon Jordan Syria Iraq Kuwait Saudi Arabia United Arab Emirates Israel Qatar Iran Factory to create some instances which may be re-implemented by user for special purpose. Create one instance of MemoryStream or custom implementation of MemoryStream. The MemoryStream instance. Create one instance of MemoryStream or custom implementation of MemoryStream. Initial capacity for the MemoryStream The MemoryStream instance. Create one CultureInfo by given id. The CultureInfo instance. This implementation is useful for situations: 1. Some cultures may not be supported by user's environment and creating the required CultureInfo with given identifier may cause Exception. To avoid the exception, user may override this method to provide a valid CultureInfo instance for the unsupported one. 2. User may want to specify some custom properties for some cultures to get expected result for formatting. For this purpose user may override this method to provide the CultureInfo instance with user specified properties. Please note UseUserOverride property of the returned CultureInfo instance may influence the formatted result. If it is false, some properties of the returned CultureInfo instance may be overridden by our built-in formatting engine according to the formatting requirements of different scenarios. If it is true, we will not change any properties of it and use it to format values directly. So, if user has specified custom properties for the returned CultureInfo instance, please make sure its UseUserOverride is true. Create one instance of random number generator. instance of random number generator Represents identifier information. Returns or sets the name of the object. Returns or sets the value of the custom property. NOTE: This member is now obsolete. Instead, please use CustomProperty.Value property. This property will be removed 12 months later since June 2010. Aspose apologizes for any inconvenience you may have experienced. Returns or sets the value of the custom property. A collection of objects that represent additional information. Adds custom property information. The name of the custom property. The value of the custom property. Gets the custom property by the specific index. The index. The custom property Gets the custom property by the property name. The property name. The custom property A collection of built-in document properties.

Provides access to objects by their names (using an indexer) and via a set of typed properties that return values of appropriate types.

Returns a object. Returns a object by the name of the property.

The string names of the properties correspond to the names of the typed properties available from .

If you request a property that is not present in the document, but the name of the property is recognized as a valid built-in name, a new is created, added to the collection and returned. The newly created property is assigned a default value (empty string, zero, false or DateTime.MinValue depending on the type of the built-in property).

If you request a property that is not present in the document and the name is not recognized as a built-in name, a null is returned.

The case-insensitive name of the property to retrieve.
Gets or sets the document's language. Gets or sets the name of the document's author. Represents an estimate of the number of bytes in the document. Represents an estimate of the number of characters in the document. Represents an estimate of the number of characters (including spaces) in the document. Gets or sets the document comments. Gets or sets the category of the document. Gets or sets the content type of the document. Gets or sets the content status of the document. Gets or sets the company property. Gets or sets the hyperlinkbase property. Gets or sets date of the document creation in local timezone.

Aspose.Cells does not update this property when you modify the document.

Gets or sets the Universal time of the document creation.

Aspose.Cells does not update this property when you modify the document.

Gets or sets the document keywords. Gets or sets the date when the document was last printed in local timezone.

If the document was never printed, this property will return DateTime.MinValue.

Aspose.Cells does not update this property when you modify the document.

Gets or sets the Universal time when the document was last printed. Gets or sets the name of the last author.

Aspose.Cells does not update this property when you modify the document.

Gets or sets the time of the last save in local timezone.

Aspose.Cells does not update this property when you modify the document.

Gets or sets the universal time of the last save.

Aspose.Cells does not update this property when you modify the document.

Represents an estimate of the number of lines in the document.

Aspose.Cells does not update this property when you modify the document.

Gets or sets the manager property. Gets or sets the name of the application. Represents an estimate of the number of pages in the document. Represents an estimate of the number of paragraphs in the document. Gets or sets the document revision number.

Aspose.Cells does not update this property when you modify the document.

Gets or sets the subject of the document. Gets or sets the informational name of the document template. Gets or sets the title of the document. Gets or sets the total editing time in minutes. Represents the version number of the application that created the document. It's format is "00.0000",for example : 12.0000 Represents the version of the file. Indicates the display mode of the document thumbnail. Indicates whether hyperlinks in a document are up-to-date. Represents an estimate of the number of words in the document. A collection of custom document properties.

Each object represents a custom property of a container document.

[C#] //Instantiate a Workbook object Workbook workbook = new Workbook("book1.xls"); //Retrieve a list of all custom document properties of the Excel file CustomDocumentPropertyCollection customProperties = workbook.Worksheets.CustomDocumentProperties; [VB.NET] 'Instantiate a Workbook object Dim workbook As New Workbook("book1.xls") 'Retrieve a list of all custom document properties of the Excel file Dim customProperties As CustomDocumentPropertyCollection = workbook.Worksheets.CustomDocumentProperties
Creates a new custom document property. Creates a new custom document property of the PropertyType.String data type. The name of the property. The value of the property. The newly created property object. Creates a new custom document property of the PropertyType.Number data type. The name of the property. The value of the property. The newly created property object. Creates a new custom document property of the PropertyType.DateTime data type. The name of the property. The value of the property. The newly created property object. Creates a new custom document property of the PropertyType.Boolean data type. The name of the property. The value of the property. The newly created property object. Creates a new custom document property of the PropertyType.Float data type. The name of the property. The value of the property. The newly created property object. Creates a new custom document property which links to content. The name of the property. The source of the property. It should be the name of named range. The newly created property object. Update custom document property value which links to content. Update custom document property value to linked range. Represents a custom or built-in document property. [C#] //Instantiate a Workbook object Workbook workbook = new Workbook("book1.xls"); //Retrieve a list of all custom document properties of the Excel file DocumentPropertyCollection customProperties = workbook.Worksheets.CustomDocumentProperties; //Accessng a custom document property by using the property index DocumentProperty customProperty1 = customProperties[3]; //Accessng a custom document property by using the property name DocumentProperty customProperty2 = customProperties["Owner"]; [VB.NET] 'Instantiate a Workbook object Dim workbook As Workbook = New Workbook("book1.xls") 'Retrieve a list of all custom document properties of the Excel file Dim customProperties As DocumentPropertyCollection = workbook.Worksheets.CustomDocumentProperties 'Accessng a custom document property by using the property index Dim customProperty1 As DocumentProperty = customProperties(3) 'Accessng a custom document property by using the property name Dim customProperty2 As DocumentProperty = customProperties("Owner") Returns the name of the property. Gets or sets the value of the property. Indicates whether this property is linked to content The linked content source. Gets the data type of the property. Returns true if this property does not have a name in the OLE2 storage and a unique name was generated only for the public API. Returns the property value as a string.

Converts a number property using Object.ToString(). Converts a boolean property into "Y" or "N". Converts a date property into a short date string.

Returns the property value as integer. Throws an exception if the property type is not PropertyType.Number. Returns the property value as double. Throws an exception if the property type is not PropertyType.Float. Returns the property value as DateTime in local timezone.

Throws an exception if the property type is not PropertyType.Date.

Returns the property value as bool.

Throws an exception if the property type is not PropertyType.Boolean.

Base class for and collections. [C#] //Instantiate a Workbook object by calling its empty constructor Workbook workbook = new Workbook("book1.xls"); //Retrieve a list of all custom document properties of the Excel file DocumentPropertyCollection customProperties = workbook.Worksheets.CustomDocumentProperties; //Accessng a custom document property by using the property index DocumentProperty customProperty1 = customProperties[3]; //Accessng a custom document property by using the property name DocumentProperty customProperty2 = customProperties["Owner"]; [VB.NET] 'Instantiate a Workbook object by calling its empty constructor Dim workbook As Workbook = New Workbook("book1.xls") 'Retrieve a list of all custom document properties of the Excel file Dim customProperties As DocumentPropertyCollection = workbook.Worksheets.CustomDocumentProperties 'Accessng a custom document property by using the property index Dim customProperty1 As DocumentProperty = customProperties(3) 'Accessng a custom document property by using the property name Dim customProperty2 As DocumentProperty = customProperties("Owner") Returns a object. Returns a object by the name of the property.

Returns null if a property with the specified name is not found.

The case-insensitive name of the property to retrieve.
Returns a object by index. Zero-based index of the to retrieve. Returns true if a property with the specified name exists in the collection. The case-insensitive name of the property. True if the property exists in the collection; false otherwise. Gets the index of a property by name. The case-insensitive name of the property. The zero based index. Negative value if not found. Removes a property with the specified name from the collection. The case-insensitive name of the property. Removes a property at the specified index. The zero based index. Specifies data type of a document property. The property is a boolean value. The property is a date time value. The property is a floating number. The property is an integer number. The property is a string value. The property is a byte array. Represents identifier information. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Add a new property. workbook.ContentTypeProperties.Add("Admin", "Aspose", "text"); //Save the Excel file workbook.Save("book1.xlsm"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Add a new property. workbook.ContentTypeProperties.Add("Admin", "Aspose", "text") 'Save the Excel file workbook.Save("book1.xlsm") Returns or sets the name of the object. Returns or sets the value of the content type property. Gets and sets the type of the property. Indicates whether the value could be empty. A collection of objects that represent additional information. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Add a new property. workbook.ContentTypeProperties.Add("Admin", "Aspose", "text"); //Save the Excel file workbook.Save("book1.xlsm"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Add a new property. workbook.ContentTypeProperties.Add("Admin", "Aspose", "text") 'Save the Excel file workbook.Save("book1.xlsm") Adds content type property information. The name of the content type property. The value of the content type property. Adds content type property information. The name of the content type property. The value of the content type property. The type of the content type property. Gets the content type property by the specific index. The index. The content type property Gets the content type property by the property name. The property name. The content type property The Aspose.Cells.Properties namespace provides classes to work with custom and built-in Spreadsheet properties such as title, keywords, company etc. Represents the data model. Gets all relationships of the tables in the data model. Gets all tables in the data model. Represents a single relationship in the spreadsheet data model. Gets the name of the foreign key table for this relationship. Gets the name of the primary key table for this relationship. Gets the name of the foreign key table column for this relationship. Gets the name of the primary key table column for this relationship. Represents the relationships. Gets the relationship. The index. Represents properties of a single table in spreadsheet data model. Gets the id of the data model table. Gets the name of the data model table. Gets the connection name of the data model table. Represents the list of the data model table. Gets the data model table by position of the collection. The position of the collection. Gets the data model table by the name. The name of data model table. The Aspose.Cells.DataModels namespace provides classes to access and update data models of the workbook. Signature in file. Constructor of digitalSignature. Uses .Net implementation. Certificate object that was used to sign the document. The purpose to signature. The utc time when the document was signed. The following example shows how to create digital signature. [C#] //signature collection contains one or more signature needed to sign DigitalSignatureCollection dsc = new DigitalSignatureCollection(); //The cert must contain private key, it can be contructed from cert file or windows certificate collection. //123456 is password of cert X509Certificate2 cert = new X509Certificate2("mykey2.pfx", "123456"); DigitalSignature ds = new DigitalSignature(cert, "test for sign", DateTime.Now); dsc.Add(ds); Workbook wb = new Workbook(); //set all signatures to workbook wb.SetDigitalSignature(dsc); wb.Save(@"newfile.xlsx"); [Visual Basic] 'signature collection contains one or more signature needed to sign Dim dsc As DigitalSignatureCollection = New DigitalSignatureCollection() 'The cert must contain private key, it can be contructed from cert file or windows certificate collection. Dim cert As X509Certificate2 = New X509Certificate2("mykey2.pfx", "123456") 'create a signature with certificate, sign purpose and sign time Dim ds As DigitalSignature = New DigitalSignature(cert, "test for sign", DateTime.Now) dsc.Add(ds) Dim wb As Workbook = New Workbook() 'set all signatures to workbook wb.SetDigitalSignature(dsc) wb.Save("newfile.xlsx") Constructor of digitalSignature. Uses Bouncy Castle implementation. A byte array containing data from an X.509 certificate. The password required to access the X.509 certificate data. The purpose to signature. The utc time when the document was signed. Certificate object that was used to sign the document. The purpose to signature. The time when the document was signed. Specifies a GUID which can be cross-referenced with the GUID of the signature line stored in the document content. Default value is Empty (all zeroes) Guid. When set, it associates with corresponding . Specifies the text of actual signature in the digital signature. Default value is Empty. Specifies an image for the digital signature. Default value is null. Specifies the class ID of the signature provider. Default value is Empty (all zeroes) Guid. The cryptographic service provider (CSP) is an independent software module that actually performs cryptography algorithms for authentication, encoding, and encryption. Microsoft Office reserves the value of {00000000-0000-0000-0000-000000000000} for its default signature provider, and {000CD6A4-0000-0000-C000-000000000046} for its East Asian signature provider. The GUID of the additionally installed provider should be obtained from the documentation shipped with the provider. If this digital signature is valid and the document has not been tampered with, this value will be true. XAdES type. Default value is None(XAdES is off). Provides a collection of digital signatures attached to a document. The following example shows how to validate digital signature. [C#] //workbook from a signed source file Workbook signedWorkbook = new Workbook(@"signedFile.xlsx"); //wb.IsDigitallySigned is true when the workbook is signed already. Console.WriteLine(signedWorkbook.IsDigitallySigned); //get digitalSignature collection from workbook DigitalSignatureCollection existingDsc = signedWorkbook.GetDigitalSignature(); foreach (DigitalSignature existingDs in existingDsc) { Console.WriteLine(existingDs.Comments); Console.WriteLine(existingDs.SignTime); Console.WriteLine(existingDs.IsValid); } [Visual Basic] 'workbook from a signed source file Dim signedWorkbook As Workbook = New Workbook("newfile.xlsx") 'Workbook.IsDigitallySigned is true when the workbook is signed already. Console.WriteLine(signedWorkbook.IsDigitallySigned) 'get digitalSignature collection from workbook Dim existingDsc As DigitalSignatureCollection = signedWorkbook.GetDigitalSignature() Dim existingDs As DigitalSignature For Each existingDs In existingDsc Console.WriteLine(existingDs.Comments) Console.WriteLine(existingDs.SignTime) Console.WriteLine(existingDs.IsValid) Next The constructor of DigitalSignatureCollection. Add one signature to DigitalSignatureCollection. Digital signature in collection. Get the enumerator for DigitalSignatureCollection, this enumerator allows iteration over the collection The enumerator to iteration. Type of XML Advanced Electronic Signature (XAdES). XAdES is off. Basic XAdES. The Aspose.Cells.DigitalSignatures namespace provides classes to sign documents and verify signatures. Represents whether and how to show objects in the workbook. Show all objects Show placeholders Hide all shapes. Encapsulates the object that represents a cell comment. [C#] Workbook workbook = new Workbook(); CommentCollection comments = workbook.Worksheets[0].Comments; //Add comment to cell A1 int commentIndex1 = comments.Add(0, 0); Comment comment1 = comments[commentIndex1]; comment1.Note = "First note."; comment1.Font.Name = "Times New Roman"; //Add comment to cell B2 comments.Add("B2"); Comment comment2 = comments["B2"]; comment2.Note = "Second note."; //do your business //Save the excel file. workbook.Save("exmaple.xlsx"); [Visual Basic] Dim workbook as Workbook = new Workbook() Dim comments as CommentCollection = workbook.Worksheets(0).Comments 'Add comment to cell A1 Dim commentIndex1 as Integer = comments.Add(0, 0) Dim comment1 as Comment = comments(commentIndex1) comment1.Note = "First note." comment1.Font.Name = "Times New Roman" 'Add comment to cell B2 comments.Add("B2") Dim comment2 As Comment = comments("B2") comment2.Note = "Second note." Gets and sets Name of the original comment author [C#] comment1.Author = "Carl.Yang"; Get a Shape object that represents the shape attached to the specified comment. [C#] CommentShape shape = comment1.CommentShape; int w = shape.Width; int h = shape.Height; Gets the row index of the comment. [C#] int row = comment1.Row; Gets the column index of the comment. [C#] int column = comment1.Column; Indicates whether this comment is a threaded comment. [C#] if(comment1.IsThreadedComment) { //This comment is a threaded comment. } Gets the list of threaded comments; [C#] ThreadedCommentCollection threadedComments = comment1.ThreadedComments; for (int i = 0; i < threadedComments.Count; ++i) { ThreadedComment tc = threadedComments[i]; string note = tc.Notes; } Represents the content of comment. If this is a threaded comment, the note could not be changed, otherwise MS Excel could not process it as a threaded comment. [C#] comment1.Note = "First note."; Gets and sets the html string which contains data and some formats in this comment. If this is a threaded comment, the note could not be changed, otherwise MS Excel could not process it as a threaded comment. [C#] comment1.HtmlNote = "<Font Style='FONT-FAMILY: Calibri;FONT-SIZE: 11pt;COLOR: #0000ff;TEXT-ALIGN: left;'>This is a <b>test</b>.</Font>"; Gets the font of comment. [C#] Aspose.Cells.Font font = comment1.Font; font.Size = 12; Format some characters with the font setting. The start index. The length. The font setting. The flag of the font setting. Returns a Characters object that represents a range of characters within the comment text. The index of the start of the character. The number of characters. Characters object. [C#] Aspose.Cells.FontSetting fontSetting = comment1.Characters(0, 4); Returns all Characters objects that represents a range of characters within the comment text. All Characters objects [C#] ArrayList list = comment1.GetCharacters(); NOTE: This method is now obsolete. Instead, please use Comment.GetRichFormattings() method. This method will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced. Returns all Characters objects that represents a range of characters within the comment text. All Characters objects [C#] FontSetting[] list = comment1.GetRichFormattings(); Represents if the comment is visible or not. [C#] if(comment1.IsVisible) { //The comment is visible } Gets and sets the text orientation type of the comment. [C#] if(comment1.TextOrientationType == TextOrientationType.NoRotation) { comment1.TextOrientationType = TextOrientationType.TopToBottom; } Gets and sets the text horizontal alignment type of the comment. [C#] if (comment1.TextHorizontalAlignment == TextAlignmentType.Fill) { comment1.TextHorizontalAlignment = TextAlignmentType.Center; } Gets and sets the text vertical alignment type of the comment. [C#] if (comment1.TextVerticalAlignment == TextAlignmentType.Fill) { comment1.TextVerticalAlignment = TextAlignmentType.Center; } Indicates if size of comment is adjusted automatically according to its content. Note: In some special cases (such as Mac environment), this setting may not take effect. If this setting does not take effect, please replace it with FitToTextSize(). [C#] if(!comment1.AutoSize) { //The size of the comment varies with the content comment1.AutoSize = true; } Represents the height of the comment, in unit of centimeters. [C#] comment1.HeightCM = 1.0; Represents the width of the comment, in unit of centimeters. [C#] comment1.WidthCM = 1.0; Represents the width of the comment, in unit of pixels. [C#] comment1.Width = 10; Represents the Height of the comment, in unit of pixels. [C#] comment1.Height = 10; Represents the width of the comment, in unit of inches. [C#] comment1.WidthInch = 1.0; Represents the height of the comment, in unit of inches. [C#] comment1.HeightInch = 1.0; Encapsulates a collection of objects. [C#] Workbook workbook = new Workbook(); CommentCollection comments = workbook.Worksheets[0].Comments; //do your business [Visual Basic] Dim workbook as Workbook = new Workbook() Dim comments as CommentCollection = workbook.Worksheets(0).Comments Adds a threaded comment. Cell row index. Cell column index. The text of the comment The user of this threaded comment. object index. Adds a threaded comment. The name of the cell. The text of the comment The user of this threaded comment. object index. Gets the threaded comments by row and column index. The row index. The column index. [C#] ThreadedCommentCollection threadedComments1 = comments.GetThreadedComments(1, 1); for (int i = 0; i < threadedComments1.Count; ++i) { ThreadedComment tc = threadedComments1[i]; string note = tc.Notes; } Gets the threaded comments by cell name. The name of the cell. [C#] ThreadedCommentCollection threadedComments2 = comments.GetThreadedComments("B2"); for (int i = 0; i < threadedComments2.Count; ++i) { ThreadedComment tc = threadedComments2[i]; string note = tc.Notes; } Adds a comment to the collection. Cell row index. Cell column index. object index. [C#] int commentIndex1 = comments.Add(0, 0); Comment comment1 = comments[commentIndex1]; comment1.Note = "First note."; comment1.Font.Name = "Times New Roman"; Adds a comment to the collection. Cell name. object index. [C#] int commentIndex2 = comments.Add("B2"); Comment comment2 = comments[commentIndex2]; comment2.Note = "Second note."; comment2.Font.Name = "Times New Roman"; Gets the element at the specified index. The zero based index of the element. The element at the specified index. [C#] Comment comment3 = comments[0]; comment3.Note = "Three note."; Gets the element at the specified cell. Cell name. The element at the specified cell. [C#] Comment comment4 = comments["B2"]; comment4.Note = "Four note."; Gets the element at the specified row index and column index. Row index. Column index. The element at the specified cell. [C#] Comment comment5 = comments[1,1]; comment5.Note = "Five note."; Removes the comment of the specific cell. The name of cell which contains a comment. [C#] comments.RemoveAt("B2"); Removes the comment of the specific cell. The row index. the column index. [C#] comments.RemoveAt(1,1); Removes all comments; [C#] comments.Clear(); Represents the threaded comment. Gets the row index of the comment. Gets the column index of the comment. Gets and sets the text of the comment. Gets the author of the comment. Gets and sets the created time of this threaded comment. Represents the person who creates the threaded comments; Gets and sets the name. Gets and sets the id of the user. Gets the id of the provider. Represents all persons who . Gets and sets the current user. Gets the index of ThreadedCommentAuthor object The ThreadedCommentAuthor object The index in the ThreadedCommentAuthor collection Gets the person who create threaded comments. The index Gets the person who create threaded comments. The name of the author. Adds one thread comment person. The name of the person. The id of the provider Represents the list of threaded comments. Gets the threaded comment by the specific index. The index Adds a threaded comment; The text of the threaded comment. The author of the threaded comment Encryption Type. Only used by excel2003. We will encrypt 2007/2010 workbook using SHA AES the same as Excel does, and this EncryptionType will be ignored. XOR encryption algorithm. Office 97/2000 compatible. Enhanced encryption. Strong encryption algorithm. Error check setting applied on certain ranges. [C#] Workbook workbook = new Workbook(); ErrorCheckOptionCollection opts = workbook.Worksheets[0].ErrorCheckOptions; int optionIdx = opts.Add(); ErrorCheckOption opt = opts[optionIdx]; opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.InconsistFormula, false); opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.InconsistRange, false); opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.TextDate, false); opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.TextNumber, false); opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.Validation, false); opt.AddRange(CellArea.CreateCellArea("A1", "B10")); workbook.Save(@"Book1.xlsx"); [Visual Basic] Dim workbook As Workbook = New Workbook() Dim opts As ErrorCheckOptionCollection = workbook.Worksheets(0).ErrorCheckOptions Dim optionIdx As Integer = opts.Add() Dim opt As ErrorCheckOption = opts(optionIdx) opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.InconsistFormula, False) opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.InconsistRange, False) opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.TextDate, False) opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.TextNumber, False) opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.Validation, False) opt.AddRange(CellArea.CreateCellArea("A1", "B10")) workbook.Save("Book1.xlsx") Checks whether given error type will be checked. error type can be checked return true if given error type will be checked(green triangle will be shown for cell if the check failed). Sets whether given error type will be checked. error type can be checked. true if given error type needs to be checked(green triangle will be shown for cell if the check failed). Gets the count of ranges that influenced by this setting. the count of ranges that influenced by this setting. Adds one influenced range by this setting. the range to be added. the index of the added range in the range list of this setting. Gets the influenced range of this setting by given index. the index of range return influenced range at given index. Removes one range by given index. the index of the range to be removed. Represents all error check option. Gets object by the given index. The index Return object Add an error check option. Represents all error check type. Ignore errors when cells contain formulas that result in an error. NOTE: This member is now obsolete. Instead, please use ErrorCheckType.EvaluationError enum. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Ignore errors when formulas refer to empty cells. Ignore errors when numbers are formatted as text or are preceded by an apostrophe Ignore errors when numbers are formatted as text or are preceded by an apostrophe NOTE: This member is now obsolete. Instead, please use ErrorCheckType.NumberStoredAsText enum. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Ignore errors when formulas omit certain cells in a region. Ignore errors when a formula in a region of your worksheet differs from other formulas in the same region. Ignore errors when formulas contain text formatted cells with years represented as 2 digits. Ignore errors when formulas contain text formatted cells with years represented as 2 digits. NOTE: This member is now obsolete. Instead, please use ErrorCheckType.TwoDigitTextYear enum. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Ignore errors when unlocked cells contain formulas. Ignore errors when unlocked cells contain formulas. NOTE: This member is now obsolete. Instead, please use ErrorCheckType.UnproctedFormula enum. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Ignore errors when a cell's value in a Table does not comply with the Data Validation rules specified. Ignore errors when a cell's value in a Table does not comply with the Data Validation rules specified. NOTE: This member is now obsolete. Instead, please use ErrorCheckType.TableDataValidation enum. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced. Ignore errors when cells contain a value different from a calculated column formula. Represents custom exception type code. Invalid chart setting. Invalid data type setting. Invalid data validation setting. Invalid data validation setting. Invalid file format. Invalid formula. Invalid data. Invalid operator. Incorrect password. License related errors. Out of MS Excel limitation error. Invalid page setup setting. Invalid pivotTable setting. Invalid drawing object setting. Invalid sparkline object setting. Invalid worksheet name. Invalid worksheet type. The process is interrupted. The file is invalid. Permission is required to open this file. Unsupported feature. Unsupported stream to be opened. Files contains some undisclosed information. File content is corrupted. Invalid defined name Invalid font Invalid auto filter setting. Font substitution warning type when a font has not been found, this warning type can be get. Represents all export table options. If there are some special requirements about the exporting, such as ignoring error values, user may extend this class to overwrite corresponding apis to achive the goal. Gets and sets the DataTable which columns' data type is assigned. Indicates whether the data in the first row are exported to the column name of the DataTable. The default value is false. Indicates whether skip invalid value for the column. For example,if the column type is decimal ,the value is greater than decimal.MaxValue and this property is true,we will not throw exception again. The default value is false. Only exports visible cells. Only exports visible rows. Only exports visible columns. Exports the string value of the cells to the DataTable. Exports the html string value of the cells to the DataTable. Gets and sets the format strategy when exporting the value as string value. False, Aspose.Cells will set the DataColumn's type by the value type of the first row for performance. True, Aspose.Cells will check whether the value type in the column are mixed before set the DataColumn's type And the value type are mixed, the DataColumn's type will be string. This value indicates whether DBNulls are allowed in this table. True if a row in Workbook file represents a row in DataTable. False if a column in Workbook file represents a row in DataTable. The indexes of columns/rows which should be exported out. Strategy for duplicate names of columns. Preprocess the value of current cell to be exported. the row index of current cell the column index of cell value and type of current cell Whether current cell has been replaced with different type and/or value. The row and column index is cell's absolute index in the worksheet, not index in the exported table. User may check the value of current cell in the override implementation of this method, if current cell needs to be replaced with other type and value, here the implementation should set the expected type and value to the CellValue object and return true. By default this method does nothing and returns false. Specifies external database source type ODBC-based source DAO-based source File based database source Web query OLE DB-based source Text-based source ADO record set DSP OLE DB data source created by the Spreadsheet Data Model. Data feed data source created by the Spreadsheet Data Model. Worksheet data source created by the Spreadsheet Data Model. Worksheet data source created by the Spreadsheet Data Model. NOTE: This member is now obsolete. Instead, please use WorksheetDataModel enum. This property will be removed 12 months later since September 2017. Aspose apologizes for any inconvenience you may have experienced. Text data source created by the Spreadsheet Data Model. Text data source created by the Spreadsheet Data Model. Specifies properties about any parameters used with external data connections Parameters are valid for ODBC and web queries. SQL data type of the parameter. Only valid for ODBC sources. Flag indicating whether the query should automatically refresh when the contents of a cell that provides the parameter value changes. If true, then external data is refreshed using the new parameter value every time there's a change. If false, then external data is only refreshed when requested by the user, or some other event triggers refresh (e.g., workbook opened). Prompt string for the parameter. Presented to the spreadsheet user along with input UI to collect the parameter value before refreshing the external data. Used only when parameterType = prompt. Type of parameter used. If the parameterType=value, then the value from boolean, double, integer, or string will be used. In this case, it is expected that only one of {boolean, double, integer, or string} will be specified. The name of the parameter. Cell reference indicating which cell's value to use for the query parameter. Used only when parameterType is cell. Non-integer numeric value,Integer value,String value or Boolean value to use as the query parameter. Used only when parameterType is value. Specifies the collection Gets the element at the specified index. The zero based index of the element. The element at the specified index. Gets the element with the specified name. connection parameter name The element with the specified name. Specifies the parameter type of external connection Get the parameter value from a cell on each refresh. Prompt the user on each refresh for a parameter value. Use a constant value on each refresh for the parameter value. Specifies Credentials method used for server access. Integrated Authentication No Credentials Prompt Credentials Stored Credentials Specifies a data model connection Gets the type of this object. The string containing the database command to pass to the data provider API that will interact with the external source in order to retrieve data Returns type. The connection information string is used to make contact with an OLE DB or ODBC data source. Specifies all properties associated with an ODBC or OLE DB external data connection. Gets the type of this object. The connection information string is used to make contact with an OLE DB or ODBC data source. The connection information string is used to make contact with an OLE DB or ODBC data source. NOTE: This property is now obsolete. Instead, please use ExternalConnection.ConnectionString property. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the definition of power query formula. Specifies the OLE DB command type. 1. Query specifies a cube name 2. Query specifies a SQL statement 3. Query specifies a table name 4. Query specifies that default information has been given, and it is up to the provider how to interpret. 5. Query is against a web based List Data Provider. The string containing the database command to pass to the data provider API that will interact with the external source in order to retrieve data Specifies a second command text string that is persisted when PivotTable server-based page fields are in use. For ODBC connections, serverCommand is usually a broader query than command (no WHERE clause is present in the former). Based on these 2 commands(Command and ServerCommand), parameter UI can be populated and parameterized queries can be constructed NOTE: This property is now obsolete. Instead, please use ExternalConnection.SecondCommand property. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced. Specifies a second command text string that is persisted when PivotTable server-based page fields are in use. For ODBC connections, serverCommand is usually a broader query than command (no WHERE clause is present in the former). Based on these 2 commands(Command and ServerCommand), parameter UI can be populated and parameterized queries can be constructed Specifies an external data connection Gets the id of the connection. Specifies The unique identifier of this connection. NOTE: This property is now obsolete. Instead, please use ExternalConnection.Id property. This property will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the type of this object. Gets the definition of power query formula. Gets or Sets the external connection DataSource type. NOTE: This property is now obsolete. Instead, please use ExternalConnection.SourceType property. This property will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced. Gets or Sets the external connection DataSource type. Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source. True if the password is to be saved as part of the connection string; otherwise, False. True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false. True if this connection should be refreshed when opening the file; otherwise, false. Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. NOTE: This property is now obsolete. Instead, please use ExternalConnection.ReconnectionMethodType property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced. Indicates whether the spreadsheet application should always and only use the connection information in the external connection file indicated by the odcFile attribute when the connection is refreshed. If false, then the spreadsheet application should follow the procedure indicated by the reconnectionMethod attribute Specifies the full path to external connection file from which this connection was created. If a connection fails during an attempt to refresh data, and reconnectionMethod=1, then the spreadsheet application will try again using information from the external connection file instead of the connection object embedded within the workbook. Used when the external data source is file-based. When a connection to such a data source fails, the spreadsheet application attempts to connect directly to this file. May be expressed in URI or system-specific file path notation. Gets the connection file. True if the connection has not been refreshed for the first time; otherwise, false. This state can happen when the user saves the file before a query has finished returning. Specifies the name of the connection. Each connection must have a unique name. True when the spreadsheet application should make efforts to keep the connection open. When false, the application should close the connection after retrieving the information. Specifies the number of minutes between automatic refreshes of the connection. Specifies the user description for this connection Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false. Specifies the authentication method to be used when establishing (or re-establishing) the connection. Specifies the authentication method to be used when establishing (or re-establishing) the connection. NOTE: This property is now obsolete. Instead, please use ExternalConnection.CredentialsMethodType property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced. Indicates whether the connection can be refreshed in the background (asynchronously). true if preferred usage of the connection is to refresh asynchronously in the background; false if preferred usage of the connection is to refresh synchronously in the foreground. Gets for an ODBC or web query. The string containing the database command to pass to the data provider API that will interact with the external source in order to retrieve data Specifies the OLE DB command type. 1. Query specifies a cube name 2. Query specifies a SQL statement 3. Query specifies a table name 4. Query specifies that default information has been given, and it is up to the provider how to interpret. 5. Query is against a web based List Data Provider. The connection information string is used to make contact with an OLE DB or ODBC data source. Specifies a second command text string that is persisted when PivotTable server-based page fields are in use. For ODBC connections, serverCommand is usually a broader query than command (no WHERE clause is present in the former). Based on these 2 commands(Command and ServerCommand), parameter UI can be populated and parameterized queries can be constructed Represents the type of connection ODBC or OLE DB Web query Based on text Data model Specifies the collection [C#] Workbook wb = new Workbook("connection.xlsx"); ExternalConnectionCollection dataConns = wb.DataConnections; ExternalConnection dataConn = null; for (int i = 0; i < dataConns.Count; i++) { dataConn = dataConns[i]; //get external connection id Console.WriteLine(dataConn.ConnectionId); } [Visual Basic] Dim wb As Workbook = New Workbook("connection.xlsx") Dim dataConns As ExternalConnectionCollection = wb.DataConnections Dim dataConn As ExternalConnection Dim count As Integer = dataConns.Count - 1 Dim i As Integer For i = 0 To count Step 1 dataConn = dataConns(i) 'get external connection id Console.WriteLine(dataConn.ConnectionId) Next Gets the element at the specified index. The zero based index of the element. The element at the specified index. Gets the element with the specified name. the name of data connection The element with the specified name. Gets the element with the specified id. external connection id The element with the specified id. Specifies how to handle formatting from the HTML source Transfer all HTML formatting into the worksheet along with data. Bring data in as unformatted text (setting data types still occurs). Translate HTML formatting to rich text formatting on the data brought into the worksheet. Specifies the OLE DB command type. The command type is not specified. Specifies a cube name unsupported Specifies a SQL statement Specifies a table name Specifies that default information has been given, and it is up to the provider how to interpret. unsupported Specifies a query which is against a web based List Data Provider. unsupported Specifies the table list. Only for reading. Specifies what the spreadsheet application should do when a connection fails. On refresh use the existing connection information and if it ends up being invalid then get updated connection information, if available from the external connection file. On every refresh get updated connection information from the external connection file, if available, and use that instead of the existing connection information. In this case the data refresh will fail if the external connection file is unavailable. Never get updated connection information from the external connection file even if it is available and even if the existing connection information is invalid Specifies SQL data type of the parameter. Only valid for ODBC sources. sql unsigned offset sql signed offset sql guid sql wide long variable char sql wide variable char sql wide char sql bit sql tiny int sql big int sql long variable binary sql variable binary sql binary sql long variable char sql unknown type sql char sql numeric sql decimal sql integer sql small int sql float sql real sql double sql date type sql time type sql timestamp type sql variable char sql interval year sql interval month sql interval day sql interval hour sql interval minute sql interval second sql interval year to month sql interval day to hour sql interval day to minute sql interval day to second sql interval hour to minute sql interval hour to second sql interval minute to second Specifies the properties for a web query source. A web query will retrieve data from HTML tables, and can also supply HTTP "Get" parameters to be processed by the web server in generating the HTML by including the parameters and parameter elements. Gets the type of this object. true if the web query source is XML (versus HTML), otherwise false. This flag exists for backward compatibility with older existing spreadsheet files, and is set to true if this web query was created in Microsoft Excel 97. This is an optional attribute that can be ignored. This flag exists for backward compatibility with older existing spreadsheet files, and is set to true if this web query was refreshed in a spreadsheet application newer than or equal to Microsoft Excel 2000. This is an optional attribute that can be ignored. URL to use to refresh external data. Gets the connection file. Flag indicating whether dates should be imported into cells in the worksheet as text rather than dates. Flag indicating that XML source data should be imported instead of the HTML table itself. Returns or sets the string used with the post method of inputting data into a web server to return data from a web query. Flag indicating whether data contained within HTML PRE tags in the web page is parsed into columns when you import the page into a query table. Flag indicating whether web queries should only work on HTML tables. How to handle formatting from the HTML source when bringing web query data into the worksheet. Relevant when sourceData is True. Flag indicating whether to parse all tables inside a PRE block with the same width settings as the first row. The URL of the user-facing web page showing the web query data. This URL is persisted in the case that sourceData="true" and url has been redirected to reference an XML file. Then the user-facing page can be shown in the UI, and the XML data can be retrieved behind the scenes. The URL of the user-facing web page showing the web query data. This URL is persisted in the case that sourceData="true" and url has been redirected to reference an XML file. Then the user-facing page can be shown in the UI, and the XML data can be retrieved behind the scenes. NOTE: This property is now obsolete. Instead, please use WebQueryConnection.EditWebPage property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced. Flag indicating whether consecutive delimiters should be treated as just one delimiter. The Aspose.Cells.ExternalConnections namespace provides classes for external connections to retrieve data from external sources such as Databases and the Web. Represents the directory type of the file name. Represents an MS-DOS drive letter. It is followed by the drive letter. Or UNC file names, such as \\server\share\myfile.xls Indicates that the source workbook is on the same drive as the dependent workbook (the drive letter is omitted) Indicates that the source workbook is in a subdirectory of the current directory. Indicates that the source workbook is in the parent directory of the current directory. Represents an external link in a workbook. [C#] //Open a file with external links Workbook workbook = new Workbook("book1.xls"); //Get External Link ExternalLink externalLink = workbook.Worksheets.ExternalLinks[0]; //Change External Link's Data Source externalLink.DataSource = "d:\\link.xls"; [VB.NET] 'Open a file with external links Dim workbook As New Workbook("book1.xls") 'Get External Link Dim externalLink As ExternalLink = workbook.Worksheets.ExternalLinks(0) 'Change External Link's Data Source externalLink.DataSource = "d:\link.xls" Gets the type of external link. Get the path type of this external link Represents stored data source of the external link. Represents data source of the external link. Adds an external name. The text of the external name. If the external name belongs to a worksheet, the text should be as Sheet1!Text. The referTo of the external name. It must be a cell or the range. Indicates whether this external link is referenced by others. Indicates whether this external link is visible in MS Excel. Represents external links collection in a workbook. [C#] //Open a file with external links Workbook workbook = new Workbook("book1.xls"); //Change external link data source workbook.Worksheets.ExternalLinks[0].DataSource = "d:\\link.xls"; [Visual Basic] 'Open a file with external links Dim workbook As Workbook = New Workbook("book1.xls") 'Change external link data source workbook.Worksheets.ExternalLinks(0).DataSource = "d:\\link.xls" Gets the number of elements actually contained in the collection. Adds an external link. The external file name. All sheet names of the external file. The position of the external name in this list. Add an external link . The directory type of the file name. the file name. All sheet names of the external file. The position of the external name in this list. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Removes all external links. When removing external links, all formulas that reference to them will be removed too because the references become invalid. Removes all external links. Whether update all references of external links in formulas to references of current workbook itself. If references are required to be updated, those references of external links in formulas will be changed to current workbook when it is possible. For example, one cell's original formula is "='externalsource.xlam'!customfunction()", after removing external links, the formula will become "=customfunction()"; When the original formula is "='[externalsource.xlam]Sheet1'!$A$1", according to whether there is one sheet with name "Sheet1" in current workbook: if true, the formula will become "=Sheet1!$A$1"; if false, the formula will become "=#REF!$A$1".

If references are not required to be updated, all formulas with references to external links will be removed too because those references become invalid.
Removes the specified external link from the workbook. the index of the external link to be removed. When removing the external link, all formulas that reference to it will be removed too because the references become invalid. Removes the specified external link from the workbook. the index of the external link to be removed. Whether update all references of given external link to reference of current workbook itself. Check to get more details about this parameter. Get an enumerator that iterates through this collection. Represents the type of external link. Represents the DDE link. Represents external link. Represents the type of target mode. External link Local and full paths to files or folders. Email. Link on cell or named range. Contains data returned by file format detection methods. Gets whether the file is protected by Microsoft Rights Management Server. Returns true if the document is encrypted and requires a password to open. Gets the detected file format. Gets the detected load format. Represents the file format types. Comma-Separated Values(CSV) text file. Office Open XML SpreadsheetML file (macro-free). Office Open XML SpreadsheetML Macro-Enabled file. Office Open XML SpreadsheetML Template (macro-free). Office Open XML SpreadsheetML Macro-Enabled Template. Office Open XML SpreadsheetML addinMacro-Enabled file. Tab-Separated Values(TSV) text file. Tab-Separated Values(TSV) text file, same with . HTML format. MHTML (Web archive) format. Open Document Sheet(ODS) file. Excel97-2003 spreadsheet file. Excel 2003 XML Data file. The Excel Binary File Format (.xlsb) Represents unrecognized format, cannot be loaded. PDF (Adobe Portable Document) format. XPS (XML Paper Specification) format. Represents a TIFF file. SVG file. Represents an Excel95 xls file. Represents an Excel4.0 xls file. The file format is not supported Represents an Excel3.0 xls file. The file format is not supported Represents an Excel2.1 xls file. The file format is not supported Represents a pptx file. The file format is not supported Only for detecting file type. Represents a docx file. The file format is not supported Only for detecting file type. Data Interchange Format. Represents a doc file. The file format is not supported Only for detecting file type. Represents a ppt file. The file format is not supported Only for detecting file type. Represents a email file. The file format is not supported Only for detecting file type. Represents the MS Equation 3.0 object. The file format is not supported Only for detecting file type. Represents the embedded native object. The file format is not supported Only for detecting file type. Represents MS Visio VSD binary format. The file format is not supported Only for detecting file type. Represents MS Visio 2013 VSDX file format. The file format is not supported Only for detecting file type. Represents a docm file. The file format is not supported Only for detecting file type. Represents a dotx file. The file format is not supported Only for detecting file type. Represents a dotm file. The file format is not supported Only for detecting file type. Represents a pptm file. The file format is not supported Only for detecting file type. Represents a Potx file. The file format is not supported Only for detecting file type. Represents a Potm file. The file format is not supported Only for detecting file type. Represents a ppsx file. The file format is not supported Only for detecting file type. Represents a ppsm file. The file format is not supported Only for detecting file type. Represents office open xml file(such as xlsx, docx,pptx, etc). The file format is not supported Only for detecting file type. If the office open xml file is encrypted, it could not be detected as xlsx ,docx, pptx,etc. Represents an ODT file. The file format is not supported Only for detecting file type. Represents a ODP file. The file format is not supported Only for detecting file type. Represents an ODF file. The file format is not supported Only for detecting file type. Represents an ODG file. The file format is not supported Only for detecting file type. Represents a simple xml file. The file format is not supported Only for detecting file type. Excel97-2003 spreadsheet template. Represents an OTT file. The file format is not supported Only for detecting file type. Represents a BMP file. The file format is not supported Only for detecting file type. Represents an ots file. Represents Numbers 9.0 file format by Apple Inc. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since June 2023. Aspose apologizes for any inconvenience you may have experienced. Represents Numbers 9.0 file format by Apple Inc. Represents markdown document. Represents embedded graph chart. Represents OpenDocument Flat XML Spreadsheet (.fods) file format. Represents StarOffice Calc Spreadsheet (.sxc) file format. Represents a OTP file. The file format is not supported. Only for detecting file type. Represents Numbers 3.5 file format since 2014 by Apple Inc Represents the embedded ole object. The file format is not supported Only for detecting file type. Windows Enhanced Metafile. Windows Metafile. JPEG JFIF. Portable Network Graphics. Gif Webp Json Sql Xbase Data file Rrepesents XHtml file. Rrepesents One Note file. The file format is not supported Only for detecting file type. Rrepesents Microsoft Cabinet file. The file format is not supported Only for detecting file type. Rtf EPUB AZW3 CHM OXPS (Open XML Paper Specification) format. Rrepesents GZip file. The file format is not supported Only for detecting file type. Represents the single TrueType font file stored in the file system. Ctor. path to font file Path to font file. Returns the type of the font source. Represents the folder that contains TrueType font files. Ctor. path to fonts folder Determines whether or not to scan subfolders. Path to fonts folder. Determines whether or not to scan the subfolders. Returns the type of the font source. Specifies font settings Indicate whether the font is available. font name true if font is available, otherwise false. Get data infomation of font file data. font name the font style is bold or not the font style is italic or not whether to match the given bold/italic style exactly Data infomation of font file data. Gets or sets the default font name. Indicate whether to use system font substitutes first or not when a font is not presented and the substitute of this font is not set. e.g. On Ubuntu, "Arial" font is generally substituted by "Liberation Sans". Default value is false. Font substitute names for given original font name. Original font name. List of font substitute names to be used if original font is not presented. Returns array containing font substitute names to be used if original font is not presented. originalFontName An array containing font substitute names to be used if original font is not presented. Sets the fonts folder The folder that contains TrueType fonts. Determines whether or not to scan subfolders. Sets the fonts folders The folders that contains TrueType fonts. Determines whether or not to scan subfolders. Sets the fonts sources. An array of sources that contain TrueType fonts. Gets a copy of the array that contains the list of sources Represents data infomation of font file data. Gets binary data of font file. Gets font format type of font file. Represents font format type. Unknown font format type. TTF font format type. OTF font format type. TTC font format type. This is an abstract base class for the classes that allow the user to specify various font sources Returns the type of the font source. Specifies the type of a font source. represents single font file. represents folder with font files. represents single font in memory. Font configs for each object. Ctor. Font substitute names for given original font name. Original font name. List of font substitute names to be used if original font is not presented. Returns array containing font substitute names to be used if original font is not presented. originalFontName An array containing font substitute names to be used if original font is not presented. Sets the fonts folder The folder that contains TrueType fonts. Determines whether or not to scan subfolders. Sets the fonts folders The folders that contains TrueType fonts. Determines whether or not to scan subfolders. Sets the fonts sources. An array of sources that contain TrueType fonts. Gets a copy of the array that contains the list of sources Represents the single TrueType font file stored in memory. Ctor. Binary font data. Binary font data. Returns the type of the font source. Represents all parameters' type or return value type of function. Represents user's custom calculation engine to extend the default calculation engine of Aspose.Cells. [C#] Workbook wb = new Workbook("custom_calc.xlsx"); CalculationOptions opts = new CalculationOptions(); opts.CustomEngine = new MyEngine(); wb.CalculateFormula(opts); class MyEngine : AbstractCalculationEngine { public override void Calculate(CalculationData data) { string funcName = data.FunctionName.ToUpper(); if ("MYFUNC".Equals(funcName)) { //do calculation for MYFUNC here int count = data.ParamCount; object res = null; for (int i = 0; i < count; i++) { object pv = data.GetParamValue(i); if (pv is ReferredArea) { ReferredArea ra = (ReferredArea)pv; pv = ra.GetValue(0, 0); } //process the parameter here //res = ...; } data.CalculatedValue = res; } } } User should not modify any part of the Workbook directly in this implementation(except the calculated result of the custom function, which can be set by CalculationData.CalculatedValue property). Otherwise unexpected result or Exception may be caused. If user needs to change other data than calculated result in the implementation for some custom functions, for example, change cell's formula, style, ...etc., user should gather those data in this implementation and change them out of the scope of formula calculation. Calculates one function with given data. the required data to calculate function such as function name, parameters, ...etc. User should set the calculated value for given data for all functions(including excel native functions) that he wants to calculate by himself in this implementation. Indicates whether this engine needs the literal text of parameter while doing calculation. Default value is false. If this custom calculation engine needs the parameter's literal text, more stacks will be required to cache the literal text for parameters and Calculate() method may be called recursively to calculate the parameter's value. Generally the literal text is not needed for calculating formulas and this property should be kept as false for most implementations to get better performance. Indicates whether this engine needs the parameter to be calculated in array mode. Default value is false. If is required when calculating custom functions and user has not updated the definition for them (by ), this property needs to be set as true. If this custom calculation engine needs the parameter to be calculated in array mode, more stacks will be required to cache the tree for parameters and Calculate() method may be called recursively to calculate the parameter's value. For performance consideration, please keep this property as the default value(false) if there is no special requirement. Whether built-in functions that have been supported by the built-in engine should be checked and processed by this implementation. Default is false. If user needs to change the calculation logic of some built-in functions, this property should be set as true. Otherwise please leave this property as false for performance consideration. Whether force given function to be recalculated always when calculating shared formulas. name of the function. Generally it is custom function's name. If is true, then built-in functions will also be checked here. true if the specified function needs to be recalculated always. For shared formulas, multiple cells share the same function. If the function's parameters keep same for those cells too, then generally this function needs to be calculated only once. So for performance consideration we only calculate such kind of function once too( is called only once, instead of being called repeatedly for every cell). However, for user's custom implementation, maybe the function, especially the custom function, needs to be calculated differently for different cells. If so, user needs to override this method to make it return true for the function. And for , the given may have been initialized with the cached value of previous calculation. Monitor for user to track the progress of formula calculation. [C#] Workbook wb = new Workbook("calc.xlsx"); CalculationOptions opts = new CalculationOptions(); opts.CalculationMonitor = new MyCalculationMonitor(); wb.CalculateFormula(opts); class MyCalculationMonitor : AbstractCalculationMonitor { public override void BeforeCalculate(int sheetIndex, int rowIndex, int colIndex) { if(sheetIndex!=0 || rowIndex!=0 || colIndex!=0) { return; } Console.WriteLine("Cell A1 will be calculated."); } } Gets the old value of the calculated cell. Should be used only in and . Whether the cell's value has been changed after the calculation. Should be used only in . Gets the newly calculated value of the cell. Should be used only in . Implement this method to do business before calculating one cell. Index of the sheet that the cell belongs to. Row index of the cell Column index of the cell Implement this method to do business after one cell has been calculated. Index of the sheet that the cell belongs to. Row index of the cell Column index of the cell Implement this method to do business when calculating formulas with circular references. IEnumerator with items representing cells that depend on circular references. Whether the formula engine needs to calculate those cells in circular after this call. True to let the formula engine continue to do calculation for them. False to let the formula engine just mark those cells as Calculated. In the implementation user may also set the expected value as calculated result for part/all of those cells so the formula engine will not calculate them recursively. Monitor for user to track the change of formulas during certain operations. For example, while deleting/inserting range of cells, formulas of other cells may be changed because of the shift of references. Please note, methods in the monitor may be invoked multiple times for one object which contains the formula. [C#] Workbook wb = new Workbook("template.xlsx"); InsertOptions options = new InsertOptions(); options.FormulaChangeMonitor = new MyFormulaChangeMonitor(wb.Worksheets); wb.Worksheets[0].Cells.InsertRows(0, 2, options); class MyFormulaChangeMonitor : AbstractFormulaChangeMonitor { private readonly WorksheetCollection mWorksheets; public MyFormulaChangeMonitor(WorksheetCollection worksheets) { mWorksheets = worksheets; } public override void OnCellFormulaChanged(int sheetIndex, int rowIndex, int columnIndex) { Console.WriteLine("Cell " + mWorksheets[sheetIndex].Name + "!" + CellsHelper.CellIndexToName(rowIndex, columnIndex) + "'s formula was changed while inserting rows."); } } The event that will be triggered when the formula in a cell is changed. The sheet index of the changed cell The row index of the changed cell The column index of the changed cell The event that will be triggered when the formula of FormatCondition is changed. The FormatCondition object whose formula is changed Represents the calculation relevant data about one cell which is being calculated. All objects provided by this class are for "read" purpose only. User should not change any data in the Workbook during the formula calculation process, Otherwise unexpected result or Exception may be caused. Sets the calculated value for the cell. User can set the calculated result by this method to ignore the automatic calculation for the cell. Gets the Workbook object. Gets the Worksheet object where the cell is in. Gets the row index of the cell. Gets the column index of the cell. Gets the Cell object which is being calculated. Represents the required data when calculating one function, such as function name, parameters, ...etc. All objects provided by this class are for "read" purpose only. User should not change any data in the Workbook during the formula calculation process, Otherwise unexpected result or Exception may be caused. Gets or sets the calculated value for this function. User should set this property in his custom calculation engine for those functions the engine supports, and the set value will be returned when getting this property later. The set value may be of possible types of , or array of such kind of values, or a Range, Name, ReferredArea. Getting this property before setting value to it will make the function be calculated by the default calculation engine of Aspose.Cells and then the calculated value will be returned(generally it should be #NAME? for user-defined functions). Gets the Workbook object where the function is in. Gets the Worksheet object where the function is in. Gets the row index of the cell where the function is in. Gets the column index of the cell where the function is in. Gets the Cell object where the function is in. When calculating a formula without setting it to a cell, such as by , the formula will be calculated just like it has been set to cell A1, so both and are 0. However, cell A1 in the worksheet may has not been instantiated. So for such kind of situation this property will be null. Gets the function name to be calculated. Gets the count of parameters Gets the represented value object of the parameter at given index. The index of the parameter(0 based) The calculated value of the parameter. For one parameter:

If it is plain value, then returns the plain value itself;

If it is reference, then returns ReferredArea object;

If it references to dataset(s) with multiple values, then returns array of objects;

If it is some kind of expression that needs to be calculated, then it will be calculated in value mode and generally a single value will be returned according to current cell base. For example, if one parameter of D2's formula is A:A+B:B, then A2+B2 will be calculated and returned. However, if this parameter has been specified as array mode (by or ), then an array(object[][]) will be returned whose items are A1+B1,A2+B2,....

Gets the value(s) of the parameter at given index. If the parameter is some kind of expression that needs to be calculated, then it will be calculated in array mode. The index of the parameter(0 based) The row count limit for the returned array. If it is non-positive or greater than the actual row count, then actual row count will be used. The column count limit for the returned array. If it is non-positive or greater than the actual row count, then actual column count will be used. An array which contains all items represented by the specified parameter. For an expression that needs to be calculated, taking A:A+B:B as an example: In value mode it will be calculated to a single value according to current cell base. But in array mode, all values of A1+B1,A2+B2,A3+B3,... will be calculated and used to construct the returned array. And for such kind of situation, it is better to specify the limit for the row/column count (such as according to and ), otherwise the returned large array may increase memory cost with large amount of useless data. Gets the literal text of the parameter at given index. index of the parameter(0 based) literal text of the parameter Represents options for calculation. Indicates whether errors encountered while calculating formulas should be ignored. The error may be unsupported function, external links, etc. The default value is true. Indicates whether calculate the dependent cells recursively when calculating one cell and it depends on other cells. The default value is true. The custom formula calculation engine to extend the default calculation engine of Aspose.Cells. The monitor for user to track the progress of formula calculation. The stack size for calculating cells recursively. Default value is 200. When there are large amount of cells need to be calculated recursively in the dependency tree, StackOverflowException may be caused in the calculation process. If so, user should specify smaller value for this property. For such situation, user should determine the proper value for this property according to the actual formulas and data. However, too small value may cause performance degradation for the formula calculation and value less than 2 will make it impossible to calculate formula which depends on another one. So if the specified value is less than 2, it will be reset to 2. Specifies the strategy for processing precision of calculation. Specifies the data sources for external links used in formulas. Like , here you may specify data sources for external links used in formulas to be calculated, especially those used in INDIRECT function. For those external links used in INDIRECT function, they are not taken as part of the external links of the workbook and cannot be updated by . The match of those workbooks with external links is determined by and . So please make sure has been specified with the proper value(generally it should be same with corresponding ) for every workbook so they can be linked as expected. Specifies the encoding used for encoding/decoding characters when calculating formulas. For functions such as CHAR, CODE, the calculated result depends on the region settings and default charset of the environment. With this property user can specify the proper encoding used for those function to get the expected result. Definition of custom function for calculating with user's custom engine. Gets the indices of given custom function's parameters that need to be calculated in array mode. Name of the custom function. Indices of the parameters that need to be calculated in array mode for given custom function. Default is null, there is no parameter which needs to be calculated in array mode for the custom function. For an expression that needs to be calculated, taking A:A+B:B as an example: Generally in value mode it will be calculated to a single value according to current cell base. But in array mode, all values of A1+B1,A2+B2,A3+B3,... will be calculated and used for the calculation. Enumerates strategies for handling calculation precision. Because of the precision issue of IEEE 754 Floating-Point Arithmetic, some "seemingly simple" formulas may not be calculated as the expected result. Such as formula "=-0.45+0.43+0.02", when calculating operands by '+' operator directly, the result is not zero. For such kind of precision issue, some special strategies may give the expected result. No strategy applied on calculation. When calculating just use the original double value as operand and return the result directly. Most efficient for performance and applicable for most cases. Rounds the calculation result according with significant digits. Uses decimal as operands when possible. Most inefficient for performance. Represents options when parsing formula. Whether the formula is locale formatted. Default is false. Whether the formula is R1C1 reference style. Default is false. Whether check addins in existing external links of current workbook for user defined function without external link. Default is true(if user defined function matches one addin in existing external links, then take it as the addin). Whether parse given formula. Default is true. If it is false, then given formula string will be kept as it is for the cell until user call other methods to parse them or parsed formula data is required by other operations such as calculating formulas. Definition for parsing custom functions. For some special requirements, such as when calculating custom function in user's custom engine, some parameters of it need to be caculated in array mode, using this property can mark those parameters as array mode when parsing the formula. Otherwise user needs to update those custom functions later by to get the same result. Utility to build ICellsDataTable from custom objects for user's convenience. Creates ICellsDataTable from given sequence of int values. int values to build table Column names of the table. Its length can only be either 1(build table by the int values vertically) or length of the int values(build table by the int values horizontally) Instance of ICellsDataTable Creates ICellsDataTable from given sequence of int values. int values to build table whether build table by the int values vertiacally(true) or horizontally(false) Instance of ICellsDataTable Creates ICellsDataTable from given sequence of double values. double values to build table Column names of the table. Its length can only be either 1(build table by the double values vertically) or length of the double values(build table by the double values horizontally) Instance of ICellsDataTable Creates ICellsDataTable from given sequence of double values. double values to build table whether build table by the double values vertiacally(true) or horizontally(false) Instance of ICellsDataTable Creates ICellsDataTable from given sequence of objects. objects to build table Column names of the table. Its length can only be either 1(build table by the objects vertically) or length of the objects(build table by the objects horizontally) Instance of ICellsDataTable Creates ICellsDataTable from given sequence of objects. objects to build table Indicates whether the first row is header row. Column names of the table. Its length can only be either 1(build table by the objects vertically) or length of the objects(build table by the objects horizontally) Instance of ICellsDataTable Creates ICellsDataTable from given sequence of objects. objects to build table whether build table by the objects vertiacally(true) or horizontally(false) Instance of ICellsDataTable Creates ICellsDataTable from given 2D array. int values to build table Instance of ICellsDataTable Creates ICellsDataTable from given 2D array. double values to build table Instance of ICellsDataTable Creates ICellsDataTable from given 2D array. objects to build table Instance of ICellsDataTable Creates ICellsDataTable from given collection. the collection to build table Instance of ICellsDataTable Creates ICellsDataTable from given collection. the collection to build table Indicates whether the first row is header Instance of ICellsDataTable Represents data table. Gets the columns' name. Gets the count of the records. -1 for unknown records count. Move the cursor to the front of this object, just before the first row. Gets the data stored in the column specified by index. The zero-based index of the column. Gets the data stored in the column specified by column name. The column name. Moves the cursor down one row from its current position. if the new current row is valid; false if there are no more rows Provides the abstract base class for a strongly typed collection. Remove all elements. Removes the element at the specified index. Gets or sets the number of elements that the list can contain. Gets the number of elements. Gets or sets the element at the specified index. Provides helper functions. Gets and sets the number of significant digits. The default value is 17. Only could be 15 or 17 now. Gets the DPI of the machine. Get width of text in unit of points. The text. The font of the text. The scaling of text. Get the release version. The release version. Gets the cell row and column indexes according to its name. Name of cell. Output row index Output column index Gets cell name according to its row and column indexes. Row index. Column index. Name of cell. Gets column name according to column index. Column index. Name of column. Gets column index according to column name. Column name. Column index. Gets row name according to row index. Row index. Name of row. Gets row index according to row name. Row name. Row index. Converts the r1c1 formula of the cell to A1 formula. The r1c1 formula. The row index of the cell. The column index of the cell. The A1 formula. NOTE: This member is now obsolete. Instead, please use Worksheet.ConvertFormulaReferenceStyle() method. This property will be removed 12 months later since August 2023. Aspose apologizes for any inconvenience you may have experienced. Converts A1 formula of the cell to the r1c1 formula. The A1 formula. The row index of the cell. The column index of the cell. The R1C1 formula. NOTE: This member is now obsolete. Instead, please use Worksheet.ConvertFormulaReferenceStyle() method. This property will be removed 12 months later since August 2023. Aspose apologizes for any inconvenience you may have experienced. Convert the double value to the date time value. The double value. Date 1904 system. Convert the date time to double value. The date time. Date 1904 system. Gets or sets the startup path, which is referred to by some external formula references. Gets or sets the alternate startup path, which is referred to by some external formula references. Gets or sets the library path which is referred to by some external formula references. Gets all used colors in the workbook. The workbook object. The used colors. Gets or sets the factory for creating instances with special implementation. Add addin function. The function name. Minimum number of parameters this function requires Maximum number of parameters this function allows. The excepted parameters type of the function The function value type. NOTE: This member is now obsolete. Instead, please use WorksheetCollection.RegisterAddInFunction() methods. This method will be removed 12 months later since January 2022. Aspose apologizes for any inconvenience you may have experienced. Merges some large xls files to a xls file. The files. The cached file. The dest file. This method only supports merging data, style and formulas to the new file. The cached file is used to store some temporary data. Checks given sheet name and create a valid one when needed. If given sheet name conforms to the rules of excel sheet name, then return it. Otherwise string will be truncated if length exceeds the limit and invalid characters will be replaced with ' ', then return the rebuilt string value. sheet name to be used Checks given sheet name and create a valid one when needed. If given sheet name conforms to the rules of excel sheet name, then return it. Otherwise string will be truncated if length exceeds the limit and invalid characters will be replaced with given character, then return the rebuilt string value. sheet name to be used character which will be used to replace invalid characters in given sheet name Indicates whether the name of the sheet should be enclosed in single quotes The name of the sheet Do the initialization for .NetCore programme. We suggest you to call this method for all .NetCore initialization first. For example: CellsHelper.InitForDotNetCore(); Workbook wb = new Workbook(); Please set this property True when running on a cloud platform, such as: Azure, AWSLambda, etc, Specifies the unit of measurement. Measurement is in pixels. Measurement is in points. A point represents 1/72 of an inch. Measurement is in inches. Measurement is in centimeters. In unit of characters. Only for width. Provides utility methods for converting file format enums to strings or file extensions and back. Detects and returns the information about a format of an excel stored in a stream. A object that contains the detected information. Detects and returns the information about a format of an excel stored in a stream. The password for encrypted ooxml files. A object that contains the detected information. Detects and returns the information about a format of an excel stored in a stream. The password for encrypted ooxml files. Returns whether the password is corrected. Detects and returns the information about a format of an excel stored in a file. The file path. A object that contains the detected information. Detects and returns the information about a format of an excel stored in a file. The file path. The password for encrypted ooxml files. A object that contains the detected information. Converting file format to save format. The file format type. Converts a file name extension into a SaveFormat value. The file extension. Can be with or without a leading dot. Case-insensitive. If the extension cannot be recognized, returns . Returns true if the extension is .xlt, .xltX, .xltm,.ots. Converts a load format enumerated value into a file extension. The loaded file format. The returned extension is a lower-case string with a leading dot. If it can not be converted, returns null. Converts a LoadFormat value to a SaveFormat value if possible. The load format. The save format. Converts a save format enumerated value into a file extension. The save format. The returned extension is a lower-case string with a leading dot. Converts a SaveFormat value to a LoadFormat value if possible. The save format. The load format Represents the setting of the subtotal . The field to group by, as a zero-based integer offset The subtotal function. An array of zero-based field offsets, indicating the fields to which the subtotals are added. Indicates whether add summary below data. Encapsulates the object that represents a hyperlink. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Workbook object workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[0]; //Adding a hyperlink to a URL at "A1" cell int index = worksheet.Hyperlinks.Add("A1", 1, 1, "http://www.aspose.com"); //Getting a Hyperlink by index. Hyperlink hyperlink = worksheet.Hyperlinks[index]; //Setting display text of this hyperlink. hyperlink.TextToDisplay = "Aspose"; //Saving the Excel file workbook.Save("book1.xls"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Workbook object workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(0) 'Adding a hyperlink to a URL at "A1" cell Dim index as Integer = worksheet.Hyperlinks.Add("A1", 1, 1, "http://www.aspose.com") 'Getting a Hyperlink by index. Dim hyperlink as Hyperlink = worksheet.Hyperlinks(index); 'Setting display text of this hyperlink. hyperlink.TextToDisplay = "Aspose"; 'Saving the Excel file workbook.Save("book1.xls") Represents the address of a hyperlink. Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink. Gets the range of hyperlink. Returns or sets the ScreenTip text for the specified hyperlink. Gets the link type. Deletes this hyperlink Encapsulates a collection of objects. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[0]; //Get Hyperlinks Collection HyperlinkCollection hyperlinks = worksheet.Hyperlinks; //Adding a hyperlink to a URL at "A1" cell hyperlinks.Add("A1", 1, 1, "http://www.aspose.com"); //Saving the Excel file workbook.Save("book1.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(0) 'Get Hyperlinks Collection Dim hyperlinks As HyperlinkCollection = worksheet.Hyperlinks 'Adding a hyperlink to a URL at "A1" cell hyperlinks.Add("A1", 1, 1, "http://www.aspose.com") 'Saving the Excel file workbook.Save("book1.xls") Adds a hyperlink to a specified cell or a range of cells. First row of the hyperlink range. First column of the hyperlink range. Number of rows in this hyperlink range. Number of columns of this hyperlink range. Address of the hyperlink. object index. [C#] //Instantiating a Workbook object Workbook excel = new Workbook(); Worksheet worksheet = excel.Worksheets[0]; worksheet.Hyperlinks.Add("A4", 1, 1, "http://www.aspose.com"); worksheet.Hyperlinks.Add("A5", 1, 1, "c:\\book1.xls"); [Visual Basic] 'Instantiating a Workbook object Dim excel As Workbook = New Workbook() Dim worksheet as Worksheet = excel.Worksheets(0) worksheet.Hyperlinks.Add("A4", 1, 1, "http://www.aspose.com") worksheet.Hyperlinks.Add("A5", 1, 1, "c:\\book1.xls") Adds a hyperlink to a specified cell or a range of cells. Cell name. Number of rows in this hyperlink range. Number of columns of this hyperlink range. Address of the hyperlink. object index. Adds a hyperlink to a specified cell or a range of cells. The top-left cell of the range. The bottom-right cell of the range. Address of the hyperlink. The text to be displayed for the specified hyperlink. The screenTip text for the specified hyperlink. object index. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Remove the hyperlink at the specified index in this collection. The zero based index of the element. Clears all hyperlinks. Represents the type of hyperlink. URL Link to external file. Link the cell of the workbook. Unknown type. Allows users to add their custom value parser for parsing string values to other proper cell value object. Parses given string to proper value object. The string value to be parsed Parsed value object from given string. If given string cannot be parsed to proper value object, returns null. Gets the formatting pattern corresponding to the parsed value by last invocation of . The returned formatting pattern may be used to format corresponding cell(set to Style.Custom for the cell). Represents the options of importing data into cells. Creates the default importing options. Indicates whether apply the style of the grid view to cells. Gets or sets a value that indicates whether the string value should be converted to numeric or date value. Indicates whether new rows should be added for importing data records. Indicates whether shifting the first row down when inserting rows. Indicates whether field name should be imported. Indicates whether exporting caption as field name Only works for DataTable. Gets or sets date format string for cells with imported datetime values. Gets or sets the number formats Indicates whether the data are formulas. Gets or sets total row count to import from data source. -1 means all rows of given data source. Gets or sets total column count to import from data source. -1 means all rows of given data source. Gets or sets the columns(0-based) to import from data source. null means all columns should be imported. Default value for the value in the table is null. Indicates whether the value contains html tags. Indicates whether checking merged cells. Represents all operator about the interrupt. Mark the monitor as requesting interruption Interrupt the current operator. Represents the exported stream provider. Gets the stream. Closes the stream. Callback interface of warning. Our callback only needs to implement the "Warning" method. warning info Provides methods to license the component. In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly. [C#] License license = new License(); license.SetLicense("MyLicense.lic"); [Visual Basic] Dim license As license = New license License.SetLicense("MyLicense.lic") Initializes a new instance of this class. In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly. [C#] License license = new License(); license.SetLicense("MyLicense.lic"); [Visual Basic] Dim license As license = New license License.SetLicense("MyLicense.lic") Licenses the component.

Tries to find the license in the following locations:

1. Explicit path.

2. The folder that contains the Aspose component assembly.

3. The folder that contains the client's calling assembly.

4. The folder that contains the entry (startup) assembly.

5. An embedded resource in the client's calling assembly.

Note:On the .NET Compact Framework, tries to find the license only in these locations:

1. Explicit path.

2. An embedded resource in the client's calling assembly.

In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly. [C#] License license = new License(); license.SetLicense("MyLicense.lic"); [Visual Basic] Dim license As License = New License license.SetLicense("MyLicense.lic") Can be a full or short file name or name of an embedded resource. Use an empty string to switch to evaluation mode.
Licenses the component. A stream that contains the license.

Use this method to load a license from a stream.

[C#] License license = new License(); license.SetLicense(myStream); [Visual Basic] Dim license as License = new License license.SetLicense(myStream)
Represents cells data handler for reading large spreadsheet files in light weight mode. When reading a workbook by this mode, will be checked when reading every worksheet in the workbook. For one sheet, if gives true, then all data and properties of rows/cells of this sheet will be checked and processed by the implementation of this interface. For every row, will be called to check whether it need to be processed. If a row needs to be processed, properties of this row will be read firstly and user can access its properties by . if row's cells need to be processed too, then should returns true and then will be called for every existing cell in this row to check whether one cell need to be processed. If one cell needs to be processed, then will be called to process the cell by the implementation of this interface.

Please note, user should only operate on the values and properties of current Row/Cell object provided by corresponding method. Because the cells data is read from the template file in streaming manner, most of other objects may be reset/update later after cells data has been loaded. So when user operating other objects in this implementation, those operations may be not able to affect the objects existing in the workbook. Or even worse, those operations may cause inconsistent data in the workbook and then cause unpected issue or exception later. So, for all other objects such as shapes, column width and styles, conditional formattings, ...etc., please do not operate them in any methods of this implementation. Instead, please manage them after the workbook has been constructed.
Starts to process a worksheet. It will be called before reading cells data of a worksheet. the worksheet to read cells data. whether this sheet's cells data needs to be processed. false to ignore this sheet. Prepares to process a row. the index of next row to be processed whether this row(properties or cells data) needs to be processed. false to ignore this row and its cells and check the next row. Starts to process one row. It will be called after row's properties such as height, style, ...etc. have been read. However, cells in this row has not been read yet. Row object which is being processed currently. whether this row's cells need to be processed. false to ignore all cells in this row. Prepares to process a cell. It will be called when reaching an existing cell in current row. Current row is the row of last call of . column index of the cell to be processed whether this cell needs to be processed. false to ignore the cell and check the next one until reach the end of cells data of current row Starts to process one cell. It will be called after one cell's data has been read. Cell object which is being processed currently whether this cell needs to be kept in cells model of current sheet. Commonly it should be false so that all cells will not be kept in memory after being processed and then memory be saved. For some special purpose such as user needs to access some cells later after the whole workbook having been processed, user can make this method return true to keep those special cells in Cells model and access them later by APIs such as Cells[row, column]. However, keeping cells data in Cells model will requires more memory and if all cells are kept then reading template file in LightCells mode will become same with reading it in normal way. Represents Data provider for saving large spreadsheet files in light weight mode. When saving a workbook by this mode, will be checked when saving every worksheet in the workbook. For one sheet, if gives true, then all data and properties to be saved for rows/cells of this sheet will be provided by the implementation of this interface. In the first place, will be called to get the next row index to be saved. If a valid row index is returned(the row index must be in ascending order for the rows to be saved), then a Row object representing this row will be provided by for the implementation to set its properties. For one row, will be checked firstly. If a valid column index be returned(the column index must be in ascending order for all cells of current row), then a Cell object representing this cell will be provided by for implementation to set its data and properties. After the cell will be saved directly to the resultant spreadsheet file. Then the next cell will be checked and processed.

Please note, user should only update values and properties for current Row/Cell object provided by corresponding method. Because the cells data is written to the resultant file in streaming manner, most of other objects may have been written to the resultant file, or have been gathered and written some global data for them. So when user updating other objects while saving cells data, those operations may be not able to affect the saved data. Or even worse, those operations may cause inconsistent data be save to the resultant file and finally make the file corrupted. So, for all other objects such as shapes, column width and styles, conditional formattings, ...etc., please do not operate them in any methods of this implementation. Instead, please manage them and adjust them to the final state before calling "Save" method of the Workbook.
Starts to save a worksheet. It will be called at the beginning of saving a worksheet during saving a workbook. If the provider needs to refer to sheetIndex later in startRow(Row) or startCell(Cell) method, that is, if the process needs to know which worksheet is being processed, the implementation should retain the sheetIndex value here. index of current sheet to be saved. true if this provider will provide data for the given sheet; false if given sheet should use its normal data model(Cells). Gets the next row to be saved. It will be called at the beginning of saving a row and its cells data(before ). the next row index to be saved. -1 means the end of current sheet data has been reached and no further row of current sheet to be saved. Starts to save data of one row. It will be called at the beginning of saving a row and its cells data. If current row has some custom properties such as height, style, ...etc., implementation should set those properties to given Row object here. Row object for implementation to fill data. Its row index is the returned value of latest call of . If the row has been initialized in the inner cells model, the existing row object will be used. Otherwise a temporary Row object will be used for implementation to fill data. Gets next cell to be saved. It will be called at the beginning of saving one cell. column index of the next cell to be saved. -1 means the end of current row data has been reached and no further cell of current row to be saved. Starts to save data of one cell. Cell object for implementation to fill data. Its column index is the returned value of latest call of . If the cell has been initialized in the inner cells model, the existed cell object will be used. Otherwise a temporary Cell object will be used for implementation to fill data. Checks whether the current string value of cell needs to be gathered into a global pool. Gathering string values will take advantage only when there are many duplicated string values for the cells provided by this implementation. In this situation gathering string will save much memory and generate smaller resultant file. If there are many string values for the cells provided by LightCellsDataProvider but few of them are same, gathering string will cost more memory and time and has no advantage for the resultant file. true if string value need to be gathered into a global pool for the resultant file. Common options for loading text values Gets and sets the default encoding. Only applies for csv file. Indicates the strategy to apply style for parsed values when converting string value to number or datetime. Gets or sets a value that indicates whether the string in text file is converted to numeric data. Gets or sets a value that indicates whether the string in text file is converted to date data. Indicates whether not parsing a string value if the length is 15. Represents the options of loading .dbf file. The options. Represents the options of loading .dif file. The options. The Aspose.Cells.Loading namespace provides options classes of loading files. Represents options when importing an ebook file. Creates an options of loading the ebook file. Creates an options of loading the ebook file. The loading format Represents options when importing a html file. Creates an options of loading the file. Creates an options of loading the file. The loading format. The directory that the attached files will be saved to. NOTE: This member is now obsolete. Instead, please use HtmlLoadOptions.StreamProvider property. This property will be removed 12 months later since December 2014. Aspose apologizes for any inconvenience you may have experienced. Indicates whether importing formulas if the original html file contains formulas Indicates whether support the layout of <div> tag when the html file contains it. The default value is false. Indicates whether delete redundant spaces when the text wraps lines using <br> tag. The default value is false. Indicates whether auto-fit columns and rows. The default value is false. if true, convert string to formula when string value starts with character '=',the default value is false. NOTE: This property is now obsolete. Instead, please use HtmlLoadOptions.HasFormula property. This property will be removed 12 months later since March 2023. Aspose apologizes for any inconvenience you may have experienced. Indicates whether the text is formula if it starts with "=". Gets or sets the StreamProviderImportHtmlFile for importing objects. Gets the program id of creating the file. Only for MHT files. Get the HtmlTableLoadOptionCollection instance Represents the option when import table from html. Get or set the index of table to import from html. Get or set the id of table to import from html Get or set the name of table to import from html Get or set the original index of worksheet in the html. Get or set the target index of worksheet where the table is to be located. Indicates whether generate list objects from imported table. The default value is false. Represents the table options when importing html. Indicates whether generate list objects from imported tables. The default value is false. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Adds one HtmlTableLoadOption into this collection. one HtmlTableLoadOption the index of the added item Add a HtmlTableLoadOption to the list. Table index Add a HtmlTableLoadOption to the list. Table ID Add a HtmlTableLoadOption to the list. Table index The target index of worksheet in Excel Add a HtmlTableLoadOption to the list. Table ID The target index of worksheet in Excel Add a HtmlTableLoadOption to the list. Table index The target index of worksheet in Excel The original index of worksheet in the html Add a HtmlTableLoadOption to the list. Table ID The target index of worksheet in Excel The original index of worksheet in the html Represents the options of loading json files Creates an options of loading the file. Gets and sets the start cell. The options of import json. Indicates whether importing each attribute of JsonObject object as one worksheet when all child nodes are array nodes. Indicates whether keeping schema of this json. Sometimes we will save the file to JSON after loading JSON file. Represents the options to filter data when loading workbook from template. Load nothing for sheet data NOTE: This member is now obsolete and please use Structure instead. This property will be removed 12 months later since December 2017. Aspose apologizes for any inconvenience you may have experienced. Load all Load cells whose value is blank Load cells whose value is string Load cells whose value is numeric(including datetime) Load cells whose value is error Load cells whose value is bool Load cells value(all value types) only Load cell formulas. Generally defined Name objects(DefinedNames) also need to be loaded when loading formulas because they may be referenced by formulas. So Formula or CellData option should work with DefinedNames option together(Formula|DefinedNames or CellData|DefinedNames) for most scenarios. Load cells data including values, formulas and formatting Load charts Load shapes NOTE: This member is now obsolete and please use Drawing instead. This property will be removed 12 months later since November 2019. Aspose apologizes for any inconvenience you may have experienced. Drawing objects(including Chart, Picture, OleObject and all other drawing objects) Load merged cells Load conditional formatting Load data validations Load pivot tables Load tables Load hyperlinks Load settings for worksheet Load all data of worksheet, such as cells data, settings, objects, ...etc. Load settings for workbook Load settings for workbook and worksheet Load XmlMap Load structure of the workbook Load document properties Load defined Name objects Load VBA projects Load styles for cell formatting Load pictures Load OleObjects Load revision logs Represents the filter that provides options for loading data when loading workbook from template. User may specify the filter options or implement their own LoadFilter to specify how to load data. The following example shows how to determine the filter options according to worksheet's properties. [C#] LoadOptions opts = new LoadOptions(); opts.LoadFilter = new LoadFilterSheet(); Workbook wb = new Workbook("template.xlsx", opts); //Custom LoadFilter implementation class LoadFilterSheet : LoadFilter { public override void StartSheet(Worksheet sheet) { if (sheet.Name == "Sheet1") { LoadDataFilterOptions = LoadDataFilterOptions.All; } else { LoadDataFilterOptions = LoadDataFilterOptions.Structure; } } } Constructs one LoadFilter with default filter options LoadDataFilterOptions.All. Constructs one LoadFilter with given filter options. the default filter options The filter options to denote what data should be loaded. Specifies the sheets(indices) and order to be loaded. Default is null, that denotes to load all sheets in the default order in template file. If not null and some sheet's index is not in the returned array, then the sheet will not be loaded. Prepares filter options before loading given worksheet. User's implementation of LoadFilter can change the LoadDataFilterOptions here to denote how to load data for this worksheet. The worksheet to be loaded. There are only few properties can be used for the given worksheet object here because most data and properties have not been loaded. The available properties are: Name, Index, VisibilityType Represents the load file format. Represents recognizing the format automatically. Comma-Separated Values(CSV) text file. Comma-Separated Values(CSV) text file. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Represents Office Open XML spreadsheetML workbook or template, with or without macros. Tab-Separated Values(TSV) text file. Tab-Separated Values(TSV) text file. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Represents a tab delimited text file, same with . Represents a html file. Represents a mhtml file. Open Document Sheet(ODS) file. Open Document Sheet(ODS) file. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Represents an Excel97-2003 xls file. Represents an Excel 2003 xml file. Represents an xlsb file. Open Document Template Sheet(OTS) file. Represents a numbers file. Represents OpenDocument Flat XML Spreadsheet (.fods) file format. Represents OpenDocument Flat XML Spreadsheet (.fods) file format. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Represents StarOffice Calc Spreadsheet (.sxc) file format. Represents StarOffice Calc Spreadsheet (.sxc) file format. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Represents a simple xml file. Reprents an EPUB file. Represents an AZW3 file. Represents a CHM file. Represents unrecognized format, cannot be loaded. Image Json Data Interchange Format. Xbase Data file Represents the options of loading the file. Gets the load format. Creates an options of loading the file. Creates an options of loading the file. The loading format. Gets and set the password of the workbook. Indicates whether parsing the formula when reading the file. Only applies for Excel Xlsx, Xltx, Xltm and Xlsm file because the formulas in the files are stored with a string formula. Indicates whether parsing pivot cached records when loading the file. The default value is false. Only applies for Excel Xlsx, Xltx, Xltm , Xlsm and xlsb file Sets the default print paper size from default printer's setting. The default paper size. If there is no setting about paper size,MS Excel will use default printer's setting. Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file. Gets or sets the system regional settings based on CountryCode at the time the file was loaded. If you do not want to use the region saved in the file, please reset it after reading the file. Gets or sets the system culture info at the time the file was loaded. Gets the default style settings for initializing styles of the workbook Sets the default standard font name NOTE: This member is now obsolete. Instead, please use DefaultStyleSettings. This property will be removed 12 months later since March 2022. Aspose apologizes for any inconvenience you may have experienced. Sets the default standard font size. NOTE: This member is now obsolete. Instead, please use DefaultStyleSettings. This property will be removed 12 months later since March 2022. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the interrupt monitor. Ignore the data which are not printed if directly printing the file Only for xlsx file. Check whether data is valid in the template file. Whether check restriction of excel file when user modify cells related objects. For example, excel does not allow inputting string value longer than 32K. When you input a value longer than 32K such as by Cell.PutValue(string), if this property is true, you will get an Exception. If this property is false, we will accept your input string value as the cell's value so that later you can output the complete string value for other file formats such as CSV. However, if you have set such kind of value that is invalid for excel file format, you should not save the workbook as excel file format later. Otherwise there may be unexpected error for the generated excel file. Whether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true. For scenarios that user only needs to read some contents from template file and does not need to save the workbook back, set this property as false may improve performance, especially when using it together with some kind of LoadFilter, The filter to denote how to load data. The data handler for processing cells data when reading template file. Gets or sets the memory usage options. Gets or sets warning callback. Gets and sets the auto fitter options Only for xlsx ,spreadsheetML file now. Indicates whether auto filtering the data when loading the files. Sometimes although autofilter is set, the corresponding rows is not hidden in the file. Now only works for SpreadSheetML file. Gets and sets individual font configs. Only works for the which uses this to load. Indicates whether ignoring useless shapes. Only works for xlsx,xlsb, and xlsm files. There are many overlapping identical shapes which are useless in some files, we can ingore them when loading files. Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false. After loading workbook from template file with this option, will be set to the same value with this property. Represents the options of loading ods file. Represents the options of loading ods file. Represents the options of loading ods file. The load format type. Indicates whether applying the default style of the Excel to hyperlink. Indicates whether refresh pivot tables when loading file. Indicates whether the pivot table is classic. Represents the options for loading text file. Creates the options for loading text file. The default load file type is CSV . Creates the options for loading text file. The loading format Gets and sets character separator of text file. Gets and sets a string value as separator. True means that the file contains several encoding. Gets and sets preferred value parsers for loading text file. parsers[0] is the parser will be used for the first column in text template file, parsers[1] is the parser will be used for the second column, ...etc. The last one(parsers[parsers.length-1]) will be used for all other columns start from parsers.length-1. If one item is null, the corresponding column will be parsed by the default parser of Aspose.Cells. Indicates whether the text is formula if it starts with "=". Whether there is text qualifier for cell value. Default is true. Specifies the text qualifier for cell values. Default qualifier is '"'. When setting this property, will become true automatically. Whether consecutive delimiters should be treated as one. Indicates whether the leading single quote sign should be taken as part of the value of one cell. Default is true. If it is false, the leading single quote will be removed from corresponding cell's value and will be set as true for the cell. Whether extends data to next sheet when the rows or columns of data exceed limit. Default is false. If this property is true, extra data will be put into next sheet behind current one (if current sheet is the last one, new sheet will be appended to current workbook). If this property is false, the data exceeding limit will be ignored. The count of header rows to be repeated for extended sheets. The header rows specified by this property will be duplicated for those extended sheets. This property only takes effect when is true. The count of header columns to be repeated for extended sheets. The header columns specified by this property will be duplicated for those extended sheets. This property only takes effect when is true. The maximum count of rows to be imported for one sheet. Those rows exceeding this limit will be ignored or extended to next sheet according to . This count includes the header rows(). The maximum allowed value of it is the row limit of corresponding file format, such as for xlsx file it 1048576. If this property has not been specified or the specified value is not positive, then the maximum limit will be used too. The maximum count of columns to be imported for one sheet. Those columns exceeding this limit will be ignored or extended to next sheet according to . This count includes the header columns(). The maximum value of it is the column limit of corresponding file format, such as for xlsx file it 16384. If this property has not been specified or the specified value is not positive, then the maximum limit will be used too. Specifies how to apply style for parsed values when converting string value to number or datetime. Does not set style for the parsed value. Set the style as built-in number/datetime when the parsed value are plain numeric/datetime values. When ms excel parsing datetime or numeric values according to user's input(such as CSV file), the formatting of those values may be changed, such as leading/tailing zeros of number, year/month/day order of datetime, ...etc. This type is for simulating ms excel's behavior. Set the exact custom format for the parsed value to make the formatted value be same with the original input one. Represents the options of loading xml. Represents the options of loading xml file. Represents the options of loading xml file. The load format type. Gets and sets the start cell. Only works when the file is not speadsheetML or mapping xml to Excel. Indicates whether mapping xml to Excel. The default value is false. Indicates whether importing xml as multiple worksheets. Indicates whether converting the value in xml file to numeric or date. Gets and sets the format of numeric value. Gets and sets the format of date value. Indicates whether ignore attributes of the root element. Represents the header type of the table in the markdown file. First row as header of the table. Column name (such as A,B,C...) as header of the table. An empty header row. The Aspose.Cells.Markdown namespace contains classes that define settings for converting Excel to Markdown. Represents a Custom XML Data Storage Part (custom XML data within a package). Gets or sets the XML content of this Custom XML Data Storage Part. Gets or sets the XML content of this Custom XML Schema Data Storage Part. Gets and sets the id of the custom xml part. Represents a Custom XML Data Storage Part (custom XML data within a package). Adds an item to the collection. The XML content of this Custom XML Data Storage Part. The set of XML schemas that are associated with this custom XML part. Gets an item at the specified index. The index. Gets an item by id. Contains the GUID for the custom XML part. Represents a smart tag. Indicates whether the smart tag is deleted. Gets and set the properties of the smart tag. Gets the namespace URI of the smart tag. Gets the name of the smart tag. Change the name and the namespace URI of the smart tag. The namespace URI of the smart tag. The name of the smart tag. Represents all smart tags in the cell. Gets the row of the cell smart tags. Gets the column of the cell smart tags. Gets a object at the specific index The index. returns a object. Adds a smart tag. Specifies the namespace URI of the smart tag Specifies the name of the smart tag. The index of smart tag in the list. Represents the options of the smart tag. Indicates whether saving smart tags with the workbook. Represents the show type of smart tag. Represents the property of the cell smart tag. Gets and sets the name of the property. Gets and sets the value of the property. Represents all properties of cell smart tag. Gets a object. The index Returns a object. Gets a object by the name of the property. The name of the property. Returns a object. Adds a property of cell's smart tag. The name of the property The value of the property. return Represents all object in the worksheet. Adds a object to a cell. The row of the cell. The column of the cell. Returns index of a object in the worksheet. Add a cell smart tags. The name of the cell. Gets a object by the index. The index of the object in the list. Gets the object of the cell. The row index of the cell. The column index of the cell Returns the object of the cell. Returns null if there is no any smart tags on the cell. Gets the object of the cell. The name of the cell. Returns the object of the cell. Returns null if there is no any smart tags on the cell. Represents the show type of the smart tag. Indicates that smart tags are enabled and shown Indicates that the smart tags are enabled but the indicator not be shown. Indicates that smart tags are disabled and not displayed. The Aspose.Cells.Markup namespace contains classes that represent customer defined semantics in a document: smart tags, custom XML and more markup tags. Represents the options of loading metadata of the file. Creates an options of loading the metadata. The type of metadata. Gets and sets the type of the metadata which is loading. Represents Workbook file encryption password. The key length. Represents the type of metadata. Encrypts the file. Decrypts the file. Load the properties of the file. Represents the meta data. The following example creates a WorkbookMetadata. [C#] MetadataOptions options = new MetadataOptions(MetadataType.DocumentProperties); WorkbookMetadata meta = new WorkbookMetadata("book1.xlsx", options); meta.CustomDocumentProperties.Add("test", "test"); meta.Save("book2.xlsx"); Create the meta data object. Create the meta data object. Gets the options of the metadata. Returns a collection that represents all the built-in document properties of the spreadsheet. Returns a collection that represents all the custom document properties of the spreadsheet. Save the modified metadata to the file. The file name. Save the modified metadata to the stream. The stream. The Aspose.Cells.Metadata namespace contains all classes of loading and saving metadata of Spreadsheets. Represents rich value of the cell. Gets the error value type of the cell. Gets the image data of the cell. Gets the alt text associated with the image. Provides methods to set metered key. In this example, an attempt will be made to set metered public and private key [C#] Metered matered = new Metered(); matered.SetMeteredKey("PublicKey", "PrivateKey"); [Visual Basic] Dim matered As Metered = New Metered matered.SetMeteredKey("PublicKey", "PrivateKey") Initializes a new instance of this class. Sets metered public and private key. If you purchase metered license, when start application, this API should be called, normally, this is enough. However, if always fail to upload consumption data and exceed 24 hours, the license will be set to evaluation status, to avoid such case, you should regularly check the license status, if it is evaluation status, call this API again. public key private key Gets consumption file size consumption quantity Gets consumption credit consumption quantity Gets product name product name Check whether metered is licensed True or false Represents a defined name for a range of cells. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Accessing the first worksheet in the Excel file Worksheet worksheet = workbook.Worksheets[0]; //Creating a named range Range range = worksheet.Cells.CreateRange("B4", "G14"); //Setting the name of the named range range.Name = "TestRange"; //Saving the modified Excel file in default (that is Excel 2000) format workbook.Save("output.xls"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Accessing the first worksheet in the Excel file Dim worksheet As Worksheet = workbook.Worksheets(0) 'Creating a named range Dim range As Range = worksheet.Cells.CreateRange("B4", "G14") 'Setting the name of the named range range.Name = "TestRange" 'Saving the modified Excel file in default (that is Excel 2000) format workbook.Save("output.xls") Gets and sets the comment of the name. Only applies for Excel 2007 or higher versions. Gets the name text of the object. Gets the name full text of the object with the scope setting. Returns or sets the formula that the name is defined to refer to, beginning with an equal sign. Gets or sets a R1C1 reference of the . Get the reference of this Name. Whether the reference needs to be formatted as R1C1. Whether the reference needs to be formatted by locale. Get the reference of this Name based on specified cell. Whether the reference needs to be formatted as R1C1. Whether the reference needs to be formatted by locale. The row index of the cell. The column index of the cell. Set the reference of this Name. The reference. Whether the reference is R1C1 format. Whether the reference is locale formatted. Indicates whether this name is referred by other formulas. Indicates whether the name is visible. Indicates this name belongs to Workbook or Worksheet. 0 = Global name, otherwise index to sheet (one-based) Returns a string represents the current Range object. Gets all ranges referred by this name. All ranges. Gets all ranges referred by this name. whether recalculate it if this name has been calculated before this invocation. All ranges. Gets all references referred by this name. whether recalculate it if this name has been calculated before this invocation. All ranges. Gets the range if this name refers to a range. The range. Gets the range if this name refers to a range whether recalculate it if this name has been calculated before this invocation. The range. Gets the range if this name refers to a range. If the reference of this name is not absolute, the range may be different for different cell. The according sheet index. The according row index. The according column index The range. Represents a collection of all the objects in the spreadsheet. Defines a new name. The text to use as the name. object index. Name cannot include spaces and cannot look like cell references. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Gets all defined name by scope. The scope type. The sheet index. Only effects when scope type is Gets the element with the specified name. Name text. The element with the specified name. Remove an array of name The names' text. Remove the name. The name text. Remove the name at the specific index. index of the Name to be removed. Please make sure that the name is not referred by the other formulas before calling the method. And if the name is referred, setting Name.RefersTo as null is better. Remove all defined names which are not referenced by the formulas and data source. If the defined name is referred, we only set Name.ReferTo as null and hide them. Remove the duplicate defined names Sorts 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 Represents the scope type of defined names. All defined names. The defined names in the workbook. The defined names in a worksheet or all worksheets. The Aspose.Cells namespace provides fundamental and base classes for generating, converting, modifying, rendering and printing Spreadsheets without utilizing Microsoft Excel. For example, class is the main entry to create or load and then manipulate a spreadsheet file, class is the main class to manipulate all data and properties in a sheet, ...etc. The Aspose.Cells.Numbers namespace contains all classes of loading and converting Apple Numbers files. Indicates type of loading tables when some tables are in a sheet. Represents the options of loading Apple Numbers files. Constructor. Gets and sets the type of loading multiple tables in one worksheet. The Aspose.Cells.Tables namespace contains classes that represent tables, rows, cells and their formatting for Excel Spreadsheet files. Represents a column in a Table. [C#] Workbook workbook = new Workbook(); Cells cells = workbook.Worksheets[0].Cells; for (int i = 0; i <5; i++) { cells[0,i].PutValue(CellsHelper.ColumnIndexToName(i)); } for (int row = 1; row <10; row++) { for (int column = 0; column <4; column++) { cells[row, column].PutValue(row * column); } } ListObjectCollection tables = workbook.Worksheets[0].ListObjects; int index = tables.Add(0, 0, 9, 4, true); ListObject table = tables[0]; table.ShowTotals = true; ListColumn listColumn = table.ListColumns[4]; listColumn.TotalsCalculation = Aspose.Cells.Tables.TotalsCalculation.Sum; listColumn.Formula = "=[A]"; workbook.Save(@"Book1.xlsx"); [Visual Basic] Dim workbook As Workbook = New Workbook() Dim cells As Cells = workbook.Worksheets(0).Cells For i As Int32 = 0 To 4 cells(0, i).PutValue(CellsHelper.ColumnIndexToName(i)) Next For row As Int32 = 1 To 9 For column As Int32 = 0 To 3 cells(row, column).PutValue(row * column) Next Next Dim tables As ListObjectCollection = workbook.Worksheets(0).ListObjects Dim index As Int32 = tables.Add(0, 0, 9, 4, True) Dim table As ListObject = tables(0) table.ShowTotals = True Dim listColumn as ListColumn = table.ListColumns(4); listColumn.TotalsCalculation = Aspose.Cells.Tables.TotalsCalculation.Sum; listColumn.Formula = "=[A]"; workbook.Save("Book1.xlsx") Gets and sets the name of the column. If sets the name of the column, the according cell' value will be changed too. Gets and sets the type of calculation in the Totals row of the list column. Gets the range of this list column. Gets the formula of totals row of this list column. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The formula of this list column. Gets the formula of totals row of this list column. the formula for this list column. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. Gets and sets the formula of the list column. Gets the formula of this list column. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The formula of this list column. Sets the formula for this list column. the formula for this list column. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. Gets and sets the display labels of total row. Gets the style of the data in this column of the table. Sets the style of the data in this column of the table. Represents A collection of all the objects in the specified ListObject object. Gets the ListColumn by the index. The index. the ListColumn object. Gets the ListColumn by the name. The name of the ListColumn The ListColumn object. Represents a list object on a worksheet. The ListObject object is a member of the ListObjects collection. The ListObjects collection contains all the list objects on a worksheet. [C#] Workbook workbook = new Workbook(); Cells cells = workbook.Worksheets[0].Cells; for (int i = 0; i <5; i++) { cells[0,i].PutValue(CellsHelper.ColumnIndexToName(i)); } for (int row = 1; row <10; row++) { for (int column = 0; column <5; column++) { cells[row, column].PutValue(row * column); } } ListObjectCollection tables = workbook.Worksheets[0].ListObjects; int index = tables.Add(0, 0, 9, 4, true); ListObject table = tables[0]; table.ShowTotals = true; table.ListColumns[4].TotalsCalculation = Aspose.Cells.Tables.TotalsCalculation.Sum; workbook.Save(@"Book1.xlsx"); [Visual Basic] Dim workbook As Workbook = New Workbook() Dim cells As Cells = workbook.Worksheets(0).Cells For i As Int32 = 0 To 4 cells(0, i).PutValue(CellsHelper.ColumnIndexToName(i)) Next For row As Int32 = 1 To 9 For column As Int32 = 0 To 4 cells(row, column).PutValue(row * column) Next Next Dim tables As ListObjectCollection = workbook.Worksheets(0).ListObjects Dim index As Int32 = tables.Add(0, 0, 9, 4, True) Dim table As ListObject = tables(0) table.ShowTotals = True table.ListColumns(4).TotalsCalculation = Aspose.Cells.Tables.TotalsCalculation.Sum workbook.Save("Book1.xlsx") Gets the start row of the range. Gets the start column of the range. Gets the end row of the range. Gets the end column of the range. Gets ListColumns of the ListObject. Resize the range of the list object. The start row index of the new range. The start column index of the new range. The end row index of the new range. The end column index of the new range. Whether this table has headers. Put the value to the cell. The row offset in the table. The column offset in the table. The cell value. Put the value to the cell. The row offset in the table. The column offset in the table. The cell value. Indicates whether it is a label for total row,only works for total row. If False and this row is total row, a new row will be inserted. Put the formula to the cell in the table. The row offset in the table. The column offset in the table. The formula of the cell. Put the formula to the cell in the table. The row offset in the table. The column offset in the table. The formula of the cell. Gets and sets whether this ListObject show header row. Gets and sets whether this ListObject show total row. Gets the data range of the ListObject. Updates all list columns' name from the worksheet. The value of the cells in the header row of the table must be same as the name of the ListColumn; Cell.PutValue do not auto modify the name of the ListColumn for performance. Gets the linked QueryTable. Gets the data source type of the table. Filter the table. Gets auto filter. Gets and sets the display name. Gets and sets the comment of the table. Indicates whether the first column in the table should have the style applied. Indicates whether the last column in the table should have the style applied. Indicates whether row stripe formatting is applied. Indicates whether column stripe formatting is applied. Apply the table style to the range. Convert the table to range. Convert the table to range. the options when converting table to range. Gets and the built-in table style. [C#] Workbook workbook = new Workbook("Book1.xlsx"); ListObjectCollection tables = workbook.Worksheets[0].ListObjects; int index = tables.Add(0, 0, 9, 4, true); ListObject table = tables[0]; table.TableStyleType = TableStyleType.TableStyleDark2; workbook.Save("TableStyle.xlsx"); [Visual Basic] Dim workbook As Workbook = New Workbook("Book1.xlsx") Dim tables As ListObjectCollection = workbook.Worksheets(0).ListObjects Dim index As Int32 = tables.Add(0, 0, 9, 4, True) Dim table As ListObject = tables(0) table.TableStyleType = TableStyleType.TableStyleDark2; workbook.Save("Book1.xlsx") Gets and sets the table style name. Gets an used for this list. Gets and sets the alternative text. Gets and sets the alternative description. Represents a collection of objects in the worksheet. Gets the ListObject by index. The index. The ListObject Gets the ListObject by specified name. ListObject name. The ListObject Adds a ListObject to the worksheet. The start row of the list range. The start row of the list range. The start row of the list range. The start row of the list range. Whether the range has headers. The index of the new ListObject Adds a ListObject to the worksheet. The start cell of the list range. The end cell of the list range. Whether the range has headers. The index of the new ListObject Update all column name of the tables. Represents the table's data source type. Excel Worksheet Table Read-write SharePoint linked List XML mapper Table Query Table Represents the table style. [C#] Workbook workbook = new Workbook(); Style firstColumnStyle = workbook.CreateStyle(); firstColumnStyle.Pattern = BackgroundType.Solid; firstColumnStyle.BackgroundColor = System.Drawing.Color.Red; Style lastColumnStyle = workbook.CreateStyle(); lastColumnStyle.Font.IsBold = true; lastColumnStyle.Pattern = BackgroundType.Solid; lastColumnStyle.BackgroundColor = System.Drawing.Color.Red; string tableStyleName = "Custom1"; TableStyleCollection tableStyles = workbook.Worksheets.TableStyles; int index1 = tableStyles.AddTableStyle(tableStyleName); TableStyle tableStyle = tableStyles[index1]; TableStyleElementCollection elements = tableStyle.TableStyleElements; index1 = elements.Add(TableStyleElementType.FirstColumn); TableStyleElement element = elements[index1]; element.SetElementStyle(firstColumnStyle); index1 = elements.Add(TableStyleElementType.LastColumn); element = elements[index1]; element.SetElementStyle(lastColumnStyle); Cells cells = workbook.Worksheets[0].Cells; for (int i = 0; i <5; i++) { cells[0, i].PutValue(CellsHelper.ColumnIndexToName(i)); } for (int row = 1; row <10; row++) { for (int column = 0; column <5; column++) { cells[row, column].PutValue(row * column); } } ListObjectCollection tables = workbook.Worksheets[0].ListObjects; int index = tables.Add(0, 0, 9, 4, true); ListObject table = tables[0]; table.ShowTableStyleFirstColumn = true; table.ShowTableStyleLastColumn = true; table.TableStyleName = tableStyleName; workbook.Save(@"Book1.xlsx"); [Visual Basic] Dim workbook As Workbook = New Workbook() Dim firstColumnStyle As Style = workbook.CreateStyle() firstColumnStyle.Pattern = BackgroundType.Solid firstColumnStyle.BackgroundColor = System.Drawing.Color.Red Dim lastColumnStyle As Style = workbook.CreateStyle() lastColumnStyle.Font.IsBold = True lastColumnStyle.Pattern = BackgroundType.Solid lastColumnStyle.BackgroundColor = System.Drawing.Color.Red Dim tableStyleName As String = "Custom1" Dim tableStyles As TableStyleCollection = workbook.Worksheets.TableStyles Dim index1 As Int32 = tableStyles.AddTableStyle(tableStyleName) Dim tableStyle As TableStyle = tableStyles(index1) Dim elements As TableStyleElementCollection = tableStyle.TableStyleElements index1 = elements.Add(TableStyleElementType.FirstColumn) Dim element As TableStyleElement = elements(index1) element.SetElementStyle(firstColumnStyle) index1 = elements.Add(TableStyleElementType.LastColumn) element = elements(index1) element.SetElementStyle(lastColumnStyle) Dim cells As Cells = workbook.Worksheets(0).Cells For i As Int32 = 0 To 4 cells(0, i).PutValue(CellsHelper.ColumnIndexToName(i)) Next For row As Int32 = 1 To 9 For column As Int32 = 0 To 4 cells(row, column).PutValue(row * column) Next Next Dim tables As ListObjectCollection = workbook.Worksheets(0).ListObjects Dim index As Int32 = tables.Add(0, 0, 9, 4, True) Dim table As ListObject = tables(0) table.ShowTableStyleFirstColumn = True table.ShowTableStyleLastColumn = True table.TableStyleName = tableStyleName workbook.Save("Book1.xlsx") Gets the name of table style. Gets all elements of the table style. Represents all custom table styles. Gets and sets the default style name of the table. Gets and sets the default style name of pivot table . Adds a custom table style. The table style name. The index of the table style. Adds a custom pivot table style. The pivot table style name. The index of the pivot table style. Gets the table style by the index. The position of the table style in the list. The table style object. Gets the table style by the name. The table style name. The table style object. Gets the builtin table style The builtin table style type. Represents the element of the table style. Number of rows or columns in a single band of striping. Applies only when type is firstRowStripe, secondRowStripe, firstColumnStripe, or secondColumnStripe. Gets the element type. Gets the element style. Returns the object. Sets the element style. The element style. Represents all elements of the table style. Gets an element of the table style by the index. The index. Returns object Gets the element of the table style by the element type. The element type. Returns object Adds an element. The type of the element Returns the index of the element in the list. Represents the Table or PivotTable style element type. Table style element that applies to PivotTable's blank rows. Table style element that applies to table's first column. Table style element that applies to table's first column stripes. Table style element that applies to PivotTable's first column subheading. Table style element that applies to table's first header row cell. Table style element that applies to table's first row stripes. Table style element that applies to PivotTable's first row subheading. Table style element that applies to PivotTable's first subtotal column. Table style element that applies to pivot table's first subtotal row. Table style element that applies to pivot table's grand total column. Table style element that applies to pivot table's grand total row. Table style element that applies to table's first total row cell. Table style element that applies to table's header row. Table style element that applies to table's last column. Table style element that applies to table's last header row cell. Table style element that applies to table's last total row cell. Table style element that applies to pivot table's page field labels. Table style element that applies to pivot table's page field values. Table style element that applies to table's second column stripes. Table style element that applies to pivot table's second column subheading. Table style element that applies to table's second row stripes. Table style element that applies to pivot table's second row subheading. Table style element that applies to PivotTable's second subtotal column. Table style element that applies to PivotTable's second subtotal row. Table style element that applies to PivotTable's third column subheading. Table style element that applies to PivotTable's third row subheading. Table style element that applies to pivot table's third subtotal column. Table style element that applies to PivotTable's third subtotal row. Table style element that applies to table's total row. Table style element that applies to table's entire content. Represents the built-in table style type. Represents the options when converting table to range. Gets and sets the last row index of the table. Determines the type of calculation in the Totals row of the list column. Represents Sum totals calculation. Represents Count totals calculation. Represents Average totals calculation. Represents Max totals calculation. Represents Min totals calculation. Represents Var totals calculation. Represents Count Nums totals calculation. Represents StdDev totals calculation. Represents No totals calculation. Represents custom calculation. The Aspose.Cells.Vba namespace contains classes to access Visual Basic Analysis projects and modules in Excel Spreadsheet files. Represents the module in VBA project. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); // Init VBA project. VbaProject vbaProject = workbook.VbaProject; // Add a new module. int index = vbaProject.Modules.Add(VbaModuleType.Class, "test"); // Get vba module VbaModule vbaModule = vbaProject.Modules[index]; // Set codes vbaModule.Codes = "Sub ShowMessage()\r\nMsgBox \"Welcome to Aspose!\"\r\nEnd Sub"; //Saving the Excel file workbook.Save("book1.xlsm"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Init VBA project. Dim vbaProject as VbaProject = workbook.VbaProject 'Add a new module. Dim index as Integer = vbaProject.Modules.Add(VbaModuleType.Class, "test") 'Get vba module Dim vbaModule as VbaModule = vbaProject.Modules(index) 'Set codes vbaModule.Codes = "Sub ShowMessage()\r\nMsgBox \"Welcome to Aspose!\"\r\nEnd Sub" 'Saving the Excel file workbook.Save("book1.xlsm") Gets and sets the name of Module. Gets the type of module. Gets and sets the binary codes of module. Gets and sets the codes of module. Represents the list of [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); // Init VBA project. VbaProject vbaProject = workbook.VbaProject; // Add a new module. vbaProject.Modules.Add(VbaModuleType.Class, "test"); //Saving the Excel file workbook.Save("book1.xlsm"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Init VBA project. Dim vbaProject as VbaProject = workbook.VbaProject 'Add a new module. vbaProject.Modules.Add(VbaModuleType.Class, "test") 'Saving the Excel file workbook.Save("book1.xlsm") Represents the data of Designer. We do not support to parse them. Just only for copying. Adds module for a worksheet. The worksheet Adds module. The type of module. The name of module. Inser user form into VBA Project. The name of user form The codes for the user form the designer setting about the user form Gets in the list by the index. The index. Removes module for a worksheet. The worksheet Remove the module by the name Gets in the list by the name. The name of module. Represents the type of VBA module. Represents a procedural module. Represents a document module. Represents a class module. Represents a designer module. Represents the VBA project. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); // Init VBA project. VbaProject vbaProject = workbook.VbaProject; //Saving the Excel file workbook.Save("book1.xlsm"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Init VBA project. Dim vbaProject as VbaProject = workbook.VbaProject 'Saving the Excel file workbook.Save("book1.xlsm") Sign this VBA project by a DigitalSignature DigitalSignature Indicates whether the signature of VBA project is valid or not. Gets certificate raw data if this VBA project is signed. Gets and sets the encoding of VBA project. Gets and sets the name of the VBA project. Indicates whether VBAcode is signed or not. Protects or unprotects this VBA project. indicates whether locks project for viewing. If the value is null, unprotects this VBA project, otherwise projects the this VBA project. If islockedForViewing is true, the password could not be null. Indicates whether this VBA project is protected. Indicates whether this VBA project is locked for viewing. Copy VBA project from other file. Gets all objects. Gets all references of VBA project. Validates protection password. the password Whether password is the protection password of this VBA project Represents the reference of VBA project. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); // Init VBA project. VbaProject vbaProject = workbook.VbaProject; // Add vba project reference vbaProject.References.AddRegisteredReference("stdole", "*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\system32\\stdole2.tlb#OLE Automation"); //Saving the Excel file workbook.Save("book1.xlsm"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Init VBA project. Dim vbaProject as VbaProject = workbook.VbaProject 'Add vba project reference vbaProject.References.AddRegisteredReference("stdole", "*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\system32\\stdole2.tlb#OLE Automation") 'Saving the Excel file workbook.Save("book1.xlsm") Gets the type of this reference. Gets and sets the name of the reference. Gets and sets the Libid of the reference. Gets and sets the twiddled Libid of the reference. Only for control reference. Gets and sets the extended Libid of the reference. Only for control reference. Gets and sets the referenced VBA project's identifier with an relative path. Only for project reference. Represents all references of VBA project. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); // Init VBA project. VbaProject vbaProject = workbook.VbaProject; // Add vba project reference vbaProject.References.AddRegisteredReference("stdole", "*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\system32\\stdole2.tlb#OLE Automation"); //Saving the Excel file workbook.Save("book1.xlsm"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Init VBA project. Dim vbaProject as VbaProject = workbook.VbaProject 'Add vba project reference vbaProject.References.AddRegisteredReference("stdole", "*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\system32\\stdole2.tlb#OLE Automation") 'Saving the Excel file workbook.Save("book1.xlsm") Get the reference in the list by the index. The index. Add a reference to an Automation type library. The name of reference. The identifier of an Automation type library. Add a reference to a twiddled type library and its extended type library. The name of reference. The identifier of an Automation type library. The identifier of a twiddled type library The identifier of an extended type library Adds a reference to an external VBA project. The name of reference. The referenced VBA project's identifier with an absolute path. The referenced VBA project's identifier with an relative path. Copies references from other VBA project. The source references. Represents the type of VBA project reference. Specifies a reference to an Automation type library. Specifies a reference to a twiddled type library and its extended type library. Specifies a reference to an external VBA project. The Aspose.Cells.QueryTables namespace provides classes to access and update worksheet table built from data returned from an external data source, such as a SQL server or a Microsoft Access database. Represents mashup data. Gets all power query formulas. Gets power query formula parameters. NOTE: This property is now obsolete. Instead, please use DataMashup.PowerQueryFormulas property. This property will be removed 12 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Represents the definition of power query formula. Gets the type of this power query formula. Gets the name of group which contains this power query formula. Gets the definition of the power query formula. Gets and sets the name of the power query formula. Gets and sets the description of the power query formula. Gets all items of power query formula. Represents all power query formulas in the mashup data. Gets by the index in the list. The index. Gets by the name of the power query formula. The name of the item. Represents the function of power query. Gets the type of power query formula. Gets and sets the definition of function. Represents the item of the power query formula. Gets the name of the item. Gets the value of the item. Represents all item of the power query formula. Gets by the index in the list. The index. Gets by the name of the item. The name of the item. Represents the parameter of power query formula. Gets the type of power query formula. Gets the value of parameter. Gets the definition of the parameter. NOTE: This property is now obsolete. Instead, please use PowerQueryFormulaParameter.FormulaDefinition property. This property will be removed 12 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Gets the definition of the parameter. Represents the parameters of power query formula. NOTE: This class is now obsolete. Instead, please use PowerQueryFormulaCollection class. This property will be removed 12 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced. Gets by the index in the list. The index. Gets by the name of the item. The name of the item. Represents the type of power query formula. Formula power query formula. Function power query formula. Parameter power query formula. The Aspose.Cells.Revisions namespace provides classes to access revisions of Excel Spreadsheet files. Represents options of highlighting revsions or changes of shared Excel files. Represents options of highlighting revsions or changes of shared Excel files. Indicates whether highlighting changes on screen. Indicates whether listing changes on a new worksheet. Represents the revision. Represents the type of revision. Gets the worksheet. Gets the number of this revision. Zero means this revision does not contains id. Represents the type of revision action. Add revision. Delete revision. Column delete revision. Row delete revision. Column insert revision. Row insert revision. represents a revision record of information about a formatting change. Gets the type of the revision. Gets the location where the formatting was applied. Represents the revision that changing cells. Represents the type of revision. Gets the name of the cell. Gets the row index of the cell. Gets the column index of the cell. Indicates whether this cell is new formatted. Indicates whether this cell is old formatted. Gets the old formula. Gets old value of the cell. Gets new value of the cell. Gets the old formula. Gets the new style of the cell. Gets the old style of the cell. Represents a revision record of a cell comment change. Gets the type of revision. Gets the row index of the which contains a comment. Gets the column index of the which contains a comment. Gets the name of the cell. Gets the action type of the revision. Indicates whether it's an old comment. Gets Length of the comment text added in this revision. Gets Length of the comment before this revision was made. Represents a revision record on a cell(s) that moved. Represents the type of revision. Gets the source area. Gets the destination area. Gets the source worksheet. Represents all revision logs. Gets by the index. Represents a revision record of adding or removing a custom view to the workbook Gets the type of revision. Gets the type of action. Gets the globally unique identifier of the custom view. Represents a revision record of a defined name change. Represents the type of revision. Gets the text of the defined name. Gets the old formula. Gets the formula. Represents a revision record of information about a formatting change. Gets the type of revision. The range to which this formatting was applied. Gets the applied style. Represents a list of specific changes that have taken place for this workbook. Gets and sets rhe date and time when this set of revisions was saved. Gets and sets the name of the user making the revision. Represents a revision record of a row/column insert/delete action. Represents the type of revision. Gets the inserting/deleting range. Gets the action type of this revision. Gets revision list by this operation. Represents a revision record of a sheet that was inserted. Gets the type of revision. Gets the action type of the revision. Gets the name of the worksheet. Gets the zero based position of the new sheet in the sheet tab bar. Represents the revision log. Gets table that contains metadata about a list of specific changes that have taken place for this workbook. Gets all revisions in this log. Represents all revision logs. Gets and sets the number of days the spreadsheet application will keep the change history for this workbook. Gets by index. The index. Returns object. Highlights changes of shared workbook. Set the options for filtering which changes should be tracked. Represents a revision record which indicates that there was a merge conflict. Gets the type of revision. Represents a revision of a query table field change. Represents the type of the revision. Gets the location of the affected query table. Gets ID of the specific query table field that was removed. Represents a revision of renaming sheet. Represents the type of the revision. Gets the old name of the worksheet. Gets the new name of the worksheet. Represents the revision type. Custom view. Defined name. Cells change. Auto format. Merge conflict. Comment. Format. Insert worksheet. Move cells. Undo. Query table. Inserting or deleting. Rename worksheet. Unknown. The Aspose.Cells.Saving namespace provides options classes of saving files. Represents the options of saving dbf file Indicates whether exporting as string value The options of saving .dbf file. Represents the options for saving ebook file. Creates options for saving ebook file. Creates options for saving ebook file. The file format. It should be or . Represents column type map. Gets string type in the database. Gets numeric type in the database. Represents the type of operating data. Insert data. Update data. Delete data. Represents the options of saving sql. Creates options for saving sql file. Check if the table name exists before creating Gets and sets the map of column type for different database. Check all data to find columns' data type. The default value is false, we only check the first row for performance. If this property is true and the columns contains mixed value type, the columns' type will be text. Insert blank line between each data. If is '\n' , it's better to set this property as true to increase readability. Gets and sets character separator of sql script. Only can be ' ' or '\n'. If the Gets and sets the operator type of sql. Represents which column is primary key of the data table. Indicates whether exporting sql of creating table. Gets and sets the name of id column. If this property is set , a column will be inserted with automatical increment int value. Gets and sets the start id. Only works when is set. Gets and sets the table name. Indicates whether exporting all data as string value. Represents the indexes of exported sheets. Gets or sets the exporting range. Indicates whether the range contains header row. The Aspose.Cells.Slicers namespace provides all classes for Pivot Table Slicer options for Excel Spreadsheet files. Represent summary description of slicer cache [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; cells[5, 0].Value = "grape"; cells[6, 0].Value = "blueberry"; cells[7, 0].Value = "kiwi"; cells[8, 0].Value = "cherry"; cells[0, 1].Value = "year"; cells[1, 1].Value = 2020; cells[2, 1].Value = 2020; cells[3, 1].Value = 2020; cells[4, 1].Value = 2020; cells[5, 1].Value = 2021; cells[6, 1].Value = 2021; cells[7, 1].Value = 2021; cells[8, 1].Value = 2021; cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; cells[5, 2].Value = 90; cells[6, 2].Value = 100; cells[7, 2].Value = 110; cells[8, 2].Value = 120; PivotTableCollection pivots = sheet.PivotTables; int pivotIndex = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "year"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; pivot.RefreshData(); pivot.CalculateData(); SlicerCollection slicers = sheet.Slicers; int slicerIndex = slicers.Add(pivot, "E12", "fruit"); Slicer slicer = slicers[slicerIndex]; slicer.StyleType = SlicerStyleType.SlicerStyleLight2; //Get SlicerCache object of current slicer SlicerCache slicerCache = slicer.SlicerCache; //do your business book.Save("out.xlsx"); Returns or sets whether a slicer is participating in cross filtering with other slicers that share the same slicer cache, and how cross filtering is displayed. Read/write Returns whether the slicer associated with the specified slicer cache is based on an Non-OLAP data source. Read-only [C#] Console.WriteLine(slicerCache.List); Returns a SlicerCacheItem collection that contains the collection of all items in the slicer cache. Read-only [C#] //get SlicerCacheItem collection that contains the collection of all items in the slicer cache. SlicerCacheItemCollection slicerCacheItems = slicerCache.SlicerCacheItems; Console.WriteLine(slicerCacheItems.Count); Returns the name of the slicer cache. [C#] //get the name of the slicer cache. Console.WriteLine(slicerCache.Name); Returns the name of this slicer cache. [C#] //get the name of this slicer cache. Console.WriteLine(slicerCache.SourceName); Represent the type of SlicerCacheCrossFilterType The table style element of the slicer style for slicer items with no data is not applied to slicer items with no data, and slicer items with no data are not sorted separately in the list of slicer items in the slicer view The table style element of the slicer style for slicer items with no data is applied to slicer items with no data, and slicer items with no data are sorted at the bottom in the list of slicer items in the slicer view The table style element of the slicer style for slicer items with no data is applied to slicer items with no data, and slicer items with no data are not sorted separately in the list of slicer items in the slicer view. Represent slicer data source item Specifies whether the SlicerItem is selected or not. Returns the label text for the slicer item. Read-only. Represent the collection of SlicerCacheItem [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; cells[5, 0].Value = "grape"; cells[6, 0].Value = "blueberry"; cells[7, 0].Value = "kiwi"; cells[8, 0].Value = "cherry"; cells[0, 1].Value = "year"; cells[1, 1].Value = 2020; cells[2, 1].Value = 2020; cells[3, 1].Value = 2020; cells[4, 1].Value = 2020; cells[5, 1].Value = 2021; cells[6, 1].Value = 2021; cells[7, 1].Value = 2021; cells[8, 1].Value = 2021; cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; cells[5, 2].Value = 90; cells[6, 2].Value = 100; cells[7, 2].Value = 110; cells[8, 2].Value = 120; PivotTableCollection pivots = sheet.PivotTables; int pivotIndex = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "year"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; pivot.RefreshData(); pivot.CalculateData(); SlicerCollection slicers = sheet.Slicers; int slicerIndex = slicers.Add(pivot, "E12", "fruit"); Slicer slicer = slicers[slicerIndex]; slicer.StyleType = SlicerStyleType.SlicerStyleLight2; SlicerCacheItemCollection items = slicer.SlicerCache.SlicerCacheItems; //do your business book.Save("out.xlsx"); [Visual Basic] Dim book As Workbook = New Workbook() Dim sheet As Worksheet = book.Worksheets(0) Dim cells As Cells = sheet.Cells cells(0, 0).Value = "fruit" cells(1, 0).Value = "grape" cells(2, 0).Value = "blueberry" cells(3, 0).Value = "kiwi" cells(4, 0).Value = "cherry" cells(5, 0).Value = "grape" cells(6, 0).Value = "blueberry" cells(7, 0).Value = "kiwi" cells(8, 0).Value = "cherry" cells(0, 1).Value = "year" cells(1, 1).Value = 2020 cells(2, 1).Value = 2020 cells(3, 1).Value = 2020 cells(4, 1).Value = 2020 cells(5, 1).Value = 2021 cells(6, 1).Value = 2021 cells(7, 1).Value = 2021 cells(8, 1).Value = 2021 cells(0, 2).Value = "amount" cells(1, 2).Value = 50 cells(2, 2).Value = 60 cells(3, 2).Value = 70 cells(4, 2).Value = 80 cells(5, 2).Value = 90 cells(6, 2).Value = 100 cells(7, 2).Value = 110 cells(8, 2).Value = 120 Dim pivots As PivotTableCollection = sheet.PivotTables Dim pivotIndex As Int32 = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable") Dim pivot As PivotTable = pivots(pivotIndex) pivot.AddFieldToArea(PivotFieldType.Row, "fruit") Pivot.AddFieldToArea(PivotFieldType.Column, "year") Pivot.AddFieldToArea(PivotFieldType.Data, "amount") pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10 pivot.RefreshData() pivot.CalculateData() Dim slicers As SlicerCollection = sheet.Slicers Dim slicerIndex As Int32 = slicers.Add(pivot, "E12", "fruit") Dim slicer As Slicer = slicers(slicerIndex) slicer.StyleType = SlicerStyleType.SlicerStyleLight2 Dim items As SlicerCacheItemCollection = slicer.SlicerCache.SlicerCacheItems book.Save("out_vb.xlsx") Gets the SlicerCacheItem object by index. [C#] SlicerCacheItem item = items[0]; Gets the count of the SlicerCacheItem. [C#] int count = items.Count; Specify the sort type of SlicerCacheItem Original data order. Ascending sort type Descending sort type Specify the style of slicer view built-in light style one built-in light style two built-in light style three built-in light style four built-in light style five built-in light style six built-in style other one built-in style other two built-in dark style one built-in dark style tow built-in dark style three built-in dark style four built-in dark style five built-in dark style six user-defined style, unsupported for now unsupported summary description of Slicer View [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; cells[5, 0].Value = "grape"; cells[6, 0].Value = "blueberry"; cells[7, 0].Value = "kiwi"; cells[8, 0].Value = "cherry"; cells[0, 1].Value = "year"; cells[1, 1].Value = 2020; cells[2, 1].Value = 2020; cells[3, 1].Value = 2020; cells[4, 1].Value = 2020; cells[5, 1].Value = 2021; cells[6, 1].Value = 2021; cells[7, 1].Value = 2021; cells[8, 1].Value = 2021; cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; cells[5, 2].Value = 90; cells[6, 2].Value = 100; cells[7, 2].Value = 110; cells[8, 2].Value = 120; PivotTableCollection pivots = sheet.PivotTables; int pivotIndex = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "year"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; pivot.RefreshData(); pivot.CalculateData(); SlicerCollection slicers = sheet.Slicers; int slicerIndex = slicers.Add(pivot, "E12", "fruit"); Slicer slicer = slicers[slicerIndex]; slicer.StyleType = SlicerStyleType.SlicerStyleLight2; SlicerCacheItemCollection items = slicer.SlicerCache.SlicerCacheItems; SlicerCacheItem item = items[0]; item.Selected = false; //do your business book.Save("out.xlsx"); [Visual Basic] Dim book As Workbook = New Workbook() Dim sheet As Worksheet = book.Worksheets(0) Dim cells As Cells = sheet.Cells cells(0, 0).Value = "fruit" cells(1, 0).Value = "grape" cells(2, 0).Value = "blueberry" cells(3, 0).Value = "kiwi" cells(4, 0).Value = "cherry" cells(5, 0).Value = "grape" cells(6, 0).Value = "blueberry" cells(7, 0).Value = "kiwi" cells(8, 0).Value = "cherry" cells(0, 1).Value = "year" cells(1, 1).Value = 2020 cells(2, 1).Value = 2020 cells(3, 1).Value = 2020 cells(4, 1).Value = 2020 cells(5, 1).Value = 2021 cells(6, 1).Value = 2021 cells(7, 1).Value = 2021 cells(8, 1).Value = 2021 cells(0, 2).Value = "amount" cells(1, 2).Value = 50 cells(2, 2).Value = 60 cells(3, 2).Value = 70 cells(4, 2).Value = 80 cells(5, 2).Value = 90 cells(6, 2).Value = 100 cells(7, 2).Value = 110 cells(8, 2).Value = 120 Dim pivots As PivotTableCollection = sheet.PivotTables Dim pivotIndex As Int32 = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable") Dim pivot As PivotTable = pivots(pivotIndex) pivot.AddFieldToArea(PivotFieldType.Row, "fruit") Pivot.AddFieldToArea(PivotFieldType.Column, "year") Pivot.AddFieldToArea(PivotFieldType.Data, "amount") pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10 pivot.RefreshData() pivot.CalculateData() Dim slicers As SlicerCollection = sheet.Slicers Dim slicerIndex As Int32 = slicers.Add(pivot, "E12", "fruit") Dim slicer As Slicer = slicers(slicerIndex) slicer.StyleType = SlicerStyleType.SlicerStyleLight2 Dim items As SlicerCacheItemCollection = slicer.SlicerCache.SlicerCacheItems Dim item As SlicerCacheItem = items(0) item.Selected = False book.Save("out_vb.xlsx") Adds PivotTable connection. The PivotTable object [C#] slicer.AddPivotConnection(pivot); Removes PivotTable connection. The PivotTable object [C#] slicer.RemovePivotConnection(pivot); Specifies the title of the current Slicer object. [C#] slicer.Title = "slicer title"; Returns or sets the descriptive (alternative) text string of the Slicer object. [C#] slicer.AlternativeText = "AlternativeText test"; Indicates whether the slicer object is printable. [C#] slicer.IsPrintable = true; Indicates whether the slicer shape is locked. [C#] slicer.IsLocked = false; Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet. [C#] slicer.Placement = PlacementType.FreeFloating; Indicates whether locking aspect ratio. [C#] slicer.LockedAspectRatio = true; Indicates whether the specified slicer can be moved or resized by using the user interface. [C#] slicer.LockedPosition = false; Refreshing the slicer.Meanwhile, Refreshing and Calculating relative PivotTables. [C#] slicer.Refresh(); Returns the SlicerCache object associated with the slicer. Read-only. [C#] SlicerCache slicerCache = slicer.SlicerCache; Returns the object which contains this slicer. Read-only. [C#] Worksheet currSheet = slicer.Parent; Specify the type of Built-in slicer style the default type is SlicerStyleLight1 [C#] slicer.StyleType = SlicerStyleType.SlicerStyleLight2; Returns or sets the name of the specified slicer [C#] slicer.Name = "slicer name"; Returns or sets the caption of the specified slicer. [C#] slicer.Caption = "slicer caption"; Returns or sets whether the header that displays the slicer Caption is visible the default value is true [C#] slicer.CaptionVisible = true; Returns or sets the number of columns in the specified slicer. [C#] slicer.NumberOfColumns = 1; Returns or sets the horizontal offset of slicer shape from its left column, in pixels. [C#] slicer.LeftPixel = 2; Returns or sets the vertical offset of slicer shape from its top row, in pixels. [C#] slicer.TopPixel = 6; Returns or sets the width of the specified slicer, in points. [C#] slicer.Width = 100; Returns or sets the width of the specified slicer, in pixels. [C#] slicer.WidthPixel = 120; Returns or sets the height of the specified slicer, in points. [C#] slicer.Height = 120; Returns or sets the height of the specified slicer, in pixels. [C#] slicer.HeightPixel = 150; Gets or sets the width in unit of pixels for each column of the slicer.  [C#] slicer.ColumnWidthPixel = 120; Returns or sets the width, in points, of each column in the slicer. [C#] slicer.ColumnWidth = 80; Returns or sets the height, in pixels, of each row in the specified slicer. [C#] slicer.RowHeightPixel = 30; Returns or sets the height, in points, of each row in the specified slicer. [C#] slicer.RowHeight = 20; Specifies the collection of all the Slicer objects on the specified worksheet. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; cells[5, 0].Value = "grape"; cells[6, 0].Value = "blueberry"; cells[7, 0].Value = "kiwi"; cells[8, 0].Value = "cherry"; cells[0, 1].Value = "year"; cells[1, 1].Value = 2020; cells[2, 1].Value = 2020; cells[3, 1].Value = 2020; cells[4, 1].Value = 2020; cells[5, 1].Value = 2021; cells[6, 1].Value = 2021; cells[7, 1].Value = 2021; cells[8, 1].Value = 2021; cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; cells[5, 2].Value = 90; cells[6, 2].Value = 100; cells[7, 2].Value = 110; cells[8, 2].Value = 120; PivotTableCollection pivots = sheet.PivotTables; int pivotIndex = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "year"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; pivot.RefreshData(); pivot.CalculateData(); SlicerCollection slicers = sheet.Slicers; int tableIndex = sheet.ListObjects.Add("A1", "C9", true); ListObject table = sheet.ListObjects[tableIndex]; //do your business book.Save("out.xlsx"); [Visual Basic] Dim book As Workbook = New Workbook() Dim sheet As Worksheet = book.Worksheets(0) Dim cells As Cells = sheet.Cells cells(0, 0).Value = "fruit" cells(1, 0).Value = "grape" cells(2, 0).Value = "blueberry" cells(3, 0).Value = "kiwi" cells(4, 0).Value = "cherry" cells(5, 0).Value = "grape" cells(6, 0).Value = "blueberry" cells(7, 0).Value = "kiwi" cells(8, 0).Value = "cherry" cells(0, 1).Value = "year" cells(1, 1).Value = 2020 cells(2, 1).Value = 2020 cells(3, 1).Value = 2020 cells(4, 1).Value = 2020 cells(5, 1).Value = 2021 cells(6, 1).Value = 2021 cells(7, 1).Value = 2021 cells(8, 1).Value = 2021 cells(0, 2).Value = "amount" cells(1, 2).Value = 50 cells(2, 2).Value = 60 cells(3, 2).Value = 70 cells(4, 2).Value = 80 cells(5, 2).Value = 90 cells(6, 2).Value = 100 cells(7, 2).Value = 110 cells(8, 2).Value = 120 Dim pivots As PivotTableCollection = sheet.PivotTables Dim pivotIndex As Int32 = pivots.Add("=Sheet1!A1:C9", "A12", "TestPivotTable") Dim pivot As PivotTable = pivots(pivotIndex) pivot.AddFieldToArea(PivotFieldType.Row, "fruit") Pivot.AddFieldToArea(PivotFieldType.Column, "year") Pivot.AddFieldToArea(PivotFieldType.Data, "amount") pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10 pivot.RefreshData() pivot.CalculateData() Dim slicers As SlicerCollection = sheet.Slicers Dim tableIndex As Int32 = sheet.ListObjects.Add("A1", "C9", True) Dim table As ListObject = sheet.ListObjects(tableIndex) book.Save("out_vb.xlsx") Gets the Slicer by index. [C#] Slicer slicerByIndex = slicers[0]; Gets the Slicer by slicer's name. [C#] Slicer slicerByName = slicers["fruit"]; Remove the specified Slicer The Slicer object [C#] Slicer delSlicer = slicers[0]; slicers.Remove(delSlicer); Deletes the Slicer at the specified index The position index in Slicer collection [C#] slicers.RemoveAt(1); Clear all Slicers. Add a new Slicer using PivotTable as data source PivotTable object The cell in the upper-left corner of the Slicer range. The name of PivotField in PivotTable.BaseFields The new add Slicer index [C#] slicers.Add(pivot, "E3", "fruit"); Add a new Slicer using PivotTable as data source PivotTable object Row index of the cell in the upper-left corner of the Slicer range. Column index of the cell in the upper-left corner of the Slicer range. The name of PivotField in PivotTable.BaseFields The new add Slicer index [C#] slicers.Add(pivot, 20, 12, "fruit"); Add a new Slicer using PivotTable as data source PivotTable object Row index of the cell in the upper-left corner of the Slicer range. Column index of the cell in the upper-left corner of the Slicer range. The index of PivotField in PivotTable.BaseFields The new add Slicer index [C#] slicers.Add(pivot, 20, 8, 0); Add a new Slicer using PivotTable as data source PivotTable object The cell in the upper-left corner of the Slicer range. The index of PivotField in PivotTable.BaseFields The new add Slicer index [C#] slicers.Add(pivot, "E20", 0); Add a new Slicer using PivotTable as data source PivotTable object Row index of the cell in the upper-left corner of the Slicer range. Column index of the cell in the upper-left corner of the Slicer range. The PivotField in PivotTable.BaseFields The new add Slicer index [C#] slicers.Add(pivot, 3, 12, pivot.BaseFields[0]); Add a new Slicer using PivotTable as data source PivotTable object The cell in the upper-left corner of the Slicer range. The PivotField in PivotTable.BaseFields The new add Slicer index [C#] slicers.Add(pivot, "I3", pivot.BaseFields[0]); Add a new Slicer using ListObjet as data source ListObject object The index of ListColumn in ListObject.ListColumns The cell in the upper-left corner of the Slicer range. The new add Slicer index [C#] slicers.Add(table, 1, "E38"); Add a new Slicer using ListObjet as data source ListObject object The ListColumn in ListObject.ListColumns The cell in the upper-left corner of the Slicer range. The new add Slicer index [C#] slicers.Add(table, table.ListColumns[1], "I38"); Add a new Slicer using ListObjet as data source ListObject object The ListColumn in ListObject.ListColumns Row index of the cell in the upper-left corner of the Slicer range. Column index of the cell in the upper-left corner of the Slicer range. The new add Slicer index [C#] slicers.Add(table, table.ListColumns[1], 38, 12); The Aspose.Cells.Timelines namespace contains classes that allow to access and draw timelines in Excel Spreadsheet files. Summary description of Timeline View Due to MS Excel, Excel 2003 does not support Timeline [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; //Create date style Style dateStyle = new CellsFactory().CreateStyle(); dateStyle.Custom = "m/d/yyyy"; cells[0, 1].Value = "date"; cells[1, 1].Value = new DateTime(2021, 2, 5); cells[2, 1].Value = new DateTime(2022, 3, 8); cells[3, 1].Value = new DateTime(2023, 4, 10); cells[4, 1].Value = new DateTime(2024, 5, 16); //Set date style cells[1, 1].SetStyle(dateStyle); cells[2, 1].SetStyle(dateStyle); cells[3, 1].SetStyle(dateStyle); cells[4, 1].SetStyle(dateStyle); cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; PivotTableCollection pivots = sheet.PivotTables; //Add a PivotTable int pivotIndex = pivots.Add("=Sheet1!A1:C5", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "date"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; //Refresh PivotTable data pivot.RefreshData(); pivot.CalculateData(); //Add a new Timeline using PivotTable as data source sheet.Timelines.Add(pivot, 10, 5, "date"); //Get Timeline object Timeline timelineObj = sheet.Timelines[0]; //do your business book.Save("out.xlsx"); Returns or sets the caption of the specified Timeline. [C#] //Set the caption of the specified Timeline. timelineObj.Caption = "timeline caption test"; Returns or sets the name of the specified Timeline [C#] //Set the name of the specified Timeline. timelineObj.Name = "timeline name test"; Returns or sets the horizontal offset of timeline shape from its left column, in pixels. Returns or sets the vertical offset of timeline shape from its top row, in pixels. Returns or sets the width of the specified timeline, in pixels. Returns or sets the height of the specified timeline, in pixels. Specifies the collection of all the Timeline objects on the specified worksheet. Due to MS Excel, Excel 2003 does not support Timeline. [C#] Workbook book = new Workbook(); Worksheet sheet = book.Worksheets[0]; Cells cells = sheet.Cells; cells[0, 0].Value = "fruit"; cells[1, 0].Value = "grape"; cells[2, 0].Value = "blueberry"; cells[3, 0].Value = "kiwi"; cells[4, 0].Value = "cherry"; //Create date style Style dateStyle = new CellsFactory().CreateStyle(); dateStyle.Custom = "m/d/yyyy"; cells[0, 1].Value = "date"; cells[1, 1].Value = new DateTime(2021, 2, 5); cells[2, 1].Value = new DateTime(2022, 3, 8); cells[3, 1].Value = new DateTime(2023, 4, 10); cells[4, 1].Value = new DateTime(2024, 5, 16); //Set date style cells[1, 1].SetStyle(dateStyle); cells[2, 1].SetStyle(dateStyle); cells[3, 1].SetStyle(dateStyle); cells[4, 1].SetStyle(dateStyle); cells[0, 2].Value = "amount"; cells[1, 2].Value = 50; cells[2, 2].Value = 60; cells[3, 2].Value = 70; cells[4, 2].Value = 80; PivotTableCollection pivots = sheet.PivotTables; //Add a PivotTable int pivotIndex = pivots.Add("=Sheet1!A1:C5", "A12", "TestPivotTable"); PivotTable pivot = pivots[pivotIndex]; pivot.AddFieldToArea(PivotFieldType.Row, "fruit"); pivot.AddFieldToArea(PivotFieldType.Column, "date"); pivot.AddFieldToArea(PivotFieldType.Data, "amount"); pivot.PivotTableStyleType = PivotTableStyleType.PivotTableStyleMedium10; //Refresh PivotTable data pivot.RefreshData(); pivot.CalculateData(); //do your business book.Save("out.xlsx"); Gets the Timeline by index. [C#] //Get the Timeline by index. Timeline objByIndex = sheet.Timelines[0]; Gets the Timeline by Timeline's name. [C#] //Get the Timeline by Timeline's name. Timeline objByName = sheet.Timelines["date"]; Add a new Timeline using PivotTable as data source PivotTable object Row index of the cell in the upper-left corner of the Timeline range. Column index of the cell in the upper-left corner of the Timeline range. The name of PivotField in PivotTable.BaseFields The new add Timeline index [C#] //Add a new Timeline using PivotTable as data source sheet.Timelines.Add(pivot, 10, 5, "date"); Add a new Timeline using PivotTable as data source PivotTable object The cell name in the upper-left corner of the Timeline range. The name of PivotField in PivotTable.BaseFields The new add Timeline index [C#] //Add a new Timeline using PivotTable as data source sheet.Timelines.Add(pivot, "i15", "date"); Add a new Timeline using PivotTable as data source PivotTable object Row index of the cell in the upper-left corner of the Timeline range. Column index of the cell in the upper-left corner of the Timeline range. The index of PivotField in PivotTable.BaseFields The new add Timeline index [C#] //Add a new Timeline using PivotTable as data source sheet.Timelines.Add(pivot, 15, 5, 1); Add a new Timeline using PivotTable as data source PivotTable object The cell name in the upper-left corner of the Timeline range. The index of PivotField in PivotTable.BaseFields The new add Timeline index [C#] //Add a new Timeline using PivotTable as data source sheet.Timelines.Add(pivot, "i5", 1); Add a new Timeline using PivotTable as data source PivotTable object Row index of the cell in the upper-left corner of the Timeline range. Column index of the cell in the upper-left corner of the Timeline range. The PivotField in PivotTable.BaseFields The new add Timeline index [C#] //Add a new Timeline using PivotTable as data source sheet.Timelines.Add(pivot, 20, 5, pivot.BaseFields[1]); Add a new Timeline using PivotTable as data source PivotTable object The cell name in the upper-left corner of the Timeline range. The PivotField in PivotTable.BaseFields The new add Timeline index [C#] //Add a new Timeline using PivotTable as data source sheet.Timelines.Add(pivot, "i10", pivot.BaseFields[1]); The Aspose.Cells.WebExtensions namespace contains classes to access Office Add-in in Excel Files. Represents an Office Add-in instance. Gets and sets the uniquely identifies the Office Add-in instance in the current document. Indicates whether the user can interact with the Office Add-in or not. Get the primary reference to an Office Add-in. Gets a list of alter references. Gets all properties of web extension. Gets all bindings relationship between an Office Add-in and the data in the document. Represents a binding relationship between an Office Add-in and the data in the document. Gets and sets the binding identifier. Gets and sets the binding type. Gets and sets the binding key used to map the binding entry in this list with the bound data in the document. Represents the list of binding relationships between an Office Add-in and the data in the document. Gets web extension binding relationship by the specific index. The index. The web extension binding relationship Adds an a binding relationship between an Office Add-in and the data in the document. Represents the list of web extension. Gets web extension by the specific index. The index. The web extension. Adds a web extension. The index. Add a web video player into exel. Indicates whether auto playing the video. The start time in unit of seconds. The end time in unit of seconds. Remove web extension by the index. The index. Represents an Office Add-in custom property. Gets and set a custom property name. Gets and sets a custom property value. Represents the list of web extension properties. Gets the property of web extension by the index. The index. The property of web extension. Gets the property of web extension. The name of property. The property of web extension. Adds web extension property. The name of property. The value of property. The index of added property. Remove the property by the name. The name of the property. Represents identify the provider location and version of the extension. Gets and sets the identifier associated with the Office Add-in within a catalog provider. The identifier MUST be unique within a catalog provider. Gets and sets the version. Gets and sets the instance of the marketplace where the Office Add-in is stored. . Gets and sets the type of marketplace that the store attribute identifies. Represents the list of web extension reference. Gets web extension by the specific index. The index. The web extension Adds an empty reference of web extension. Represents the store type of web extension. Specifies that the store type is Office.com. Specifies that the store type is SharePoint corporate catalog. Specifies that the store type is a SharePoint web application. Specifies that the store type is an Exchange server. Specifies that the store type is a file system share. Specifies that the store type is the system registry. Specifies that the store type is Centralized Deployment via Exchange. Represents a persisted taskpane object. Gets and sets the web extension part associated with the taskpane instance Gets and sets the last-docked location of this taskpane object. Indicates whether the Task Pane shows as visible by default when the document opens. Indicates whether the taskpane is locked to the document in the UI and cannot be closed by the user. Gets and sets the default width value for this taskpane instance. Gets and sets the index, enumerating from the outside to the inside, of this taskpane among other persisted taskpanes docked in the same default location. Represents the list of task pane. Gets task pane by the specific index. The index. The task pane. Adds task pane. The index. The Aspose.Cells.Utility namespace contains utility classes processing JSON formats for Excel Spreadsheet files. Represents utility to convert files to other formats. Converts Excel files to other formats. The source file name. The file name of expected file. Converts Excel files to other formats. The source file name. The options of loading the source file. The file name of expected file. The options of saving the file. Indicates the options that exporting range to json. Indicates whether the range contains header row. Exports the string value of the cells to json. Indicates whether exporting empty cells as null. Indicates the indent. If the indent is null or empty, the exported json is not formatted. Represents the options of json layout type. Constructor of loading JSON layout options. Processes Array as table. Indicates whether ignoring null value. Indicates whether ignore title if array is a property of object. NOTE: This property is now obsolete. Instead, please use JsonLayoutOptions.IgnoreTitle property instead. This property will be removed 6 months later since February 2023. Aspose apologizes for any inconvenience you may have experienced. Indicates whether ignore title if object is a property of object. NOTE: This property is now obsolete. Instead, please use JsonLayoutOptions.IgnoreTitle property instead. This property will be removed 6 months later since February 2023. Aspose apologizes for any inconvenience you may have experienced. Ingores titles of attributes Indicates whether converting the string in json to numeric or date value. Gets and sets the format of numeric value. Gets and sets the format of date value. Gets and sets the style of the title. Indicates whether keeping schema of this json. Sometimes we will save the file to JSON after loading JSON file. Represents the utility class of processing json. Import the json string. The json string. The Cells. The row index. The column index. The options of import json string. Exporting the range to json file. The range. The options of exporting. The json string value. NOTE: This member is now obsolete. Instead, please use ExportRangeToJson(Range range, JsonSaveOptions options) method. This property will be removed 6 months later since November 2022. Aspose apologizes for any inconvenience you may have experienced. Exporting the range to json file. The range. The options of exporting. The json string value. The Aspose.Cells.Settings namespace contains classes that define settings for different features. Represents the globalization settings for pivot tables. Gets the text of "Total" label in the PivotTable. You need to override this method when the PivotTable contains two or more PivotFields in the data area. The text of "Total" label Gets the text of "Grand Total" label in the PivotTable. The text of "Grand Total" label Gets the text of "(Multiple Items)" label in the PivotTable. The text of "(Multiple Items)" label Gets the text of "(All)" label in the PivotTable. The text of "(All)" label Gets the protection name in the PivotTable. The protection name of PivotTable NOTE: This member is now obsolete. Instead, please use PivotGlobalizationSettings.GetTextOfProtectedName(string) method. This property will be removed 12 months later since March 2023. Aspose apologizes for any inconvenience you may have experienced. Gets the text for specified protected name. The protected name in PivotTable. The local prorected names of PivotTable. In Ms Excel, some names are not allowed to be used as the name of PivotFields in PivotTable. They are different in different region, user may specify them explicitly according to the used region. Gets the text of "Column Labels" label in the PivotTable. The text of column labels Gets the text of "Row Labels" label in the PivotTable. The text of row labels Gets the text of "(blank)" label in the PivotTable. The text of empty data Gets the the text of the value area field header in the PivotTable. The text of data field header name Gets all short formatted string of 12 months. Gets the local text of 4 Quaters. Gets the local text of "Years". Get the local text of "Quarters". Gets the local text of "Months". Gets the local text of "Days". Gets the local text of "Hours". Gets the local text of "Minutes". Gets the local text of "Seconds" Gets the local text of "Range" Gets the text of type in the PivotTable. The The text of given type Enumerates page layout alignment types. Represents bottom page layout alignment. Represents center page layout alignment. Represents left page layout alignment. Represents right page layout alignment. Represents top page layout alignment. Represents the command of header/footer Gets the header/footer' command type . Gets the font of the command's value. Useless for HeaderFooterCommandType.Picture. Gets the text of the command. Only valid for HeaderFooterCommandType.Text. Represents the command type of header and footer. The text. Current page number Page count Current date Current time Sheet name File name without path File path without file name Picture Encapsulates the object that represents a horizontal page break. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[0]; //Add a page break at cell Y30 int Index = worksheet.HorizontalPageBreaks.Add("Y30"); //get the newly added horizontal page break HorizontalPageBreak hPageBreak = worksheet.HorizontalPageBreaks[Index]; [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(0) 'Add a page break at cell Y30 Dim Index As Integer = worksheet.HorizontalPageBreaks.Add("Y30") 'get the newly added horizontal page break Dim hPageBreak As HorizontalPageBreak = worksheet.HorizontalPageBreaks(Index) Gets the start column index of this horizontal page break. Gets the end column index of this horizontal page break. Gets the zero based row index. Encapsulates a collection of objects. [C#] Workbook excel = new Workbook(); //Add a pagebreak at G5 excel.Worksheets[0].HorizontalPageBreaks.Add("G5"); excel.Worksheets[0].VerticalPageBreaks.Add("G5"); [VB] Dim excel as Workbook = new Workbook() 'Add a pagebreak at G5 excel.Worksheets(0).HorizontalPageBreaks.Add("G5") excel.Worksheets(0).VerticalPageBreaks.Add("G5") Gets the element at the specified index. The zero based index of the element. The element at the specified index. Gets the element with the specified cell name. Cell name. The element with the specified cell name. Adds a horizontal page break to the collection. Row index, zero based. Start column index, zero based. End column index, zero based. object index. This method is used to add a horizontal pagebreak within a print area. Adds a horizontal page break to the collection. Cell row index, zero based. object index. Page break is added in the top left of the cell. Please set a horizontal page break and a vertical page break concurrently. Adds a horizontal page break to the collection. Cell row index, zero based. Cell column index, zero based. object index. Page break is added in the top left of the cell. Please set a horizontal page break and a vertical page break concurrently. Adds a horizontal page break to the collection. Cell name. object index. Page break is added in the top left of the cell. Please set a horizontal page break and a vertical page break concurrently. Removes the HPageBreak element at a specified name. Element index, zero based. Represents print orientation constants. Landscape orientation Portrait orientation Encapsulates the object that represents the page setup description. The PageSetup object contains all page setup options. [C#] Workbook workbook = new Workbook(); WorksheetCollection sheets = workbook.Worksheets; //Add a worksheet sheets.Add(); Worksheet sheet = sheets[1]; PageSetup pageSetup = sheet.PageSetup; pageSetup.PrintArea = "D1:K13"; //do your business [Visual Basic] Dim excel as Workbook = new Workbook() Dim sheets as WorksheetCollection = excel.Worksheets 'Add a worksheet sheets.Add() Dim sheet as Worksheet = sheets(1) Dim pageSetup as PageSetup = sheet.PageSetup pageSetup.PrintArea = "D1:K13" Gets the background of ODS. Copies the setting of the page setup. The source. The copy options. Represents the range to be printed. Represents the columns that contain the cells to be repeated on the left side of each page. [C#] pageSetup.PrintTitleColumns = "$A:$A"; [Visula Basic] pageSetup.PrintTitleColumns = "$A:$A" Represents the rows that contain the cells to be repeated at the top of each page. [C#] pageSetup.PrintTitleRows = "$1:$1"; [Visula Basic] pageSetup.PrintTitleRows = "$1:$1" Represents if elements of the document will be printed in black and white. Represent if the sheet is printed centered horizontally. Represent if the sheet is printed centered vertically. Represents if the sheet will be printed without graphics. Represents the distance from the bottom of the page to the footer, in unit of centimeters. Represents the distance from the bottom of the page to the footer, in unit of inches. Represents the distance from the top of the page to the header, in unit of centimeters. Represents the distance from the top of the page to the header, in unit of inches. Gets and sets the settings of the default printer. Represents the size of the left margin, in unit of centimeters. Represents the size of the left margin, in unit of inches. Represents the size of the right margin, in unit of centimeters. Represents the size of the right margin, in unit of inches. Represents the size of the top margin, in unit of centimeters. Represents the size of the top margin, in unit of inches. Represents the size of the bottom margin, in unit of centimeters. Represents the size of the bottom margin, in unit of inches. Represents the first page number that will be used when this sheet is printed. Sets the number of pages the worksheet will be scaled to when it's printed. Pages wide. Pages tall. Represents the number of pages tall the worksheet will be scaled to when it's printed. The default value is 1. You have to set FitToPagesWide as zero if you want to fit all rows on one page. Represents the number of pages wide the worksheet will be scaled to when it's printed. The default value is 1. You have to set FitToPagesTall as zero if you want to fit all columns on one page. If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled. Represents the order that Microsoft Excel uses to number pages when printing a large worksheet. Indicates whether the paper size is automatic. Represents the size of the paper. Gets the width of the paper in unit of inches, considered page orientation. Gets the height of the paper in unit of inches , considered page orientation. Sets the custom paper size, in unit of inches. The width of the paper. The height of the paper. Represents page print orientation. Represents the way comments are printed with the sheet. Specifies the type of print error displayed. Represents if row and column headings are printed with this page. Represents if cell gridlines are printed on the page. Represents the scaling factor in percent. It should be between 10 and 400. Indicates whether the first the page number is automatically assigned. Represents the print quality. Get and sets number of copies to print. Clears header and footer setting. Gets a script formatting the header of an Excel file. 0: Left Section, 1: Center Section, 2: Right Section. Gets all commands of header or footer. The header/footer script Returns all commands of header or footer. Gets a script formatting the footer of an Excel file. 0: Left Section, 1: Center Section, 2: Right Section. Sets a script formatting the header of an Excel file. 0: Left Section, 1: Center Section, 2: Right Section. Header format script.

Script commands:

Command Description &P Current page number  &N Page count  &D Current date  &T Current time &A Sheet name &F File name without path &"<FontName>" Font name, for example: &"Arial" &"<FontName>, <FontStyle>" Font name and font style, for example: &"Arial,Bold" &<FontSize> Font size. If this command is followed by a plain number to be printed in the header, it will be separated from the font height with a space character. &K<RRGGBB> Font color, for example(RED): &KFF0000 &G Image script For example: "&Arial,Bold&8Header Note"
Sets a script formatting the footer of an Excel file. 0: Left Section, 1: Center Section, 2: Right Section. Footer format script.

Script commands:

Command Description &P Current page number  &N Page count  &D Current date  &T Current time &A Sheet name &F File name without path &"<FontName>" Font name, for example: &"Arial" &"<FontName>, <FontStyle>" Font name and font style, for example: &"Arial,Bold" &<FontSize> Font size. If this command is followed by a plain number to be printed in the header, it will be separated from the font height with a space character. &K<RRGGBB> Font color, for example(RED): &KFF0000 &G Image script For example: "&Arial,Bold&8Footer Note"
Sets a script formatting the even page header of an Excel file. Only effect in Excel 2007 when IsHFDiffOddEven is true. 0: Left Section, 1: Center Section, 2: Right Section. Header format script. Gets a script formatting the even header of an Excel file. 0: Left Section, 1: Center Section, 2: Right Section. Sets a script formatting the even page footer of an Excel file. Only effect in Excel 2007 when IsHFDiffOddEven is true. 0: Left Section, 1: Center Section, 2: Right Section. Footer format script. Gets a script formatting the even footer of an Excel file. 0: Left Section, 1: Center Section, 2: Right Section. Sets a script formatting the first page header of an Excel file. Only effect in Excel 2007 when IsHFDiffFirst is true. 0: Left Section, 1: Center Section, 2: Right Section. Header format script. Gets a script formatting the first page header of an Excel file. 0: Left Section, 1: Center Section, 2: Right Section. Sets a script formatting the first page footer of an Excel file. 0: Left Section, 1: Center Section, 2: Right Section. Footer format script. Gets a script formatting the first page footer of an Excel file. 0: Left Section, 1: Center Section, 2: Right Section. True means that the header/footer of the odd pages is different with odd pages. True means that the header/footer of the first page is different with other pages. Indicates whether header and footer are scaled with document scaling. Only applies for Excel 2007. Indicates whether header and footer margins are aligned with the page margins. If this property is true, the left header and footer will be aligned with the left margin, and the right header and footer will be aligned with the right margin. This option is enabled by default. Sets an image in the header of a worksheet. 0: Left Section, 1: Center Section, 2: Right Section. Image data. Returns object. Sets an image in the footer of a worksheet. 0: Left Section, 1: Center Section, 2: Right Section. Image data. Returns object. Sets an image in the header/footer of a worksheet. Indicates whether setting the picture of first page header/footer. Indicates whether setting the picture of even page header/footer. Indicates whether setting the picture of header/footer. 0: Left Section, 1: Center Section, 2: Right Section. Image data. Returns object. Gets the object of the header / footer. Indicates whether it is in the header or footer. 0: Left Section, 1: Center Section, 2: Right Section. Returns object. Returns null if there is no picture. Gets the object of the header / footer. Indicates whether getting the picture of first page header/footer. Indicates whether getting the picture of even page header/footer. Indicates whether getting the picture of header/footer. 0: Left Section, 1: Center Section, 2: Right Section. Returns object. Represents paper size constants. Letter (8-1/2 in. x 11 in.) Letter Small (8-1/2 in. x 11 in.) Tabloid (11 in. x 17 in.) Ledger (17 in. x 11 in.) Legal (8-1/2 in. x 14 in.) Statement (5-1/2 in. x 8-1/2 in.) Executive (7-1/4 in. x 10-1/2 in.) A3 (297 mm x 420 mm) A4 (210 mm x 297 mm) A4 Small (210 mm x 297 mm) A5 (148 mm x 210 mm) JIS B4 (257 mm x 364 mm) JIS B5 (182 mm x 257 mm) Folio (8-1/2 in. x 13 in.) Quarto (215 mm x 275 mm) 10 in. x 14 in. 11 in. x 17 in. Note (8-1/2 in. x 11 in.) Envelope #9 (3-7/8 in. x 8-7/8 in.) Envelope #10 (4-1/8 in. x 9-1/2 in.) Envelope #11 (4-1/2 in. x 10-3/8 in.) Envelope #12 (4-1/2 in. x 11 in.) Envelope #14 (5 in. x 11-1/2 in.) C size sheet D size sheet E size sheet Envelope DL (110 mm x 220 mm) Envelope C5 (162 mm x 229 mm) Envelope C3 (324 mm x 458 mm) Envelope C4 (229 mm x 324 mm) Envelope C6 (114 mm x 162 mm) Envelope C65 (114 mm x 229 mm) Envelope B4 (250 mm x 353 mm) Envelope B5 (176 mm x 250 mm) Envelope B6 (176 mm x 125 mm) Envelope Italy (110 mm x 230 mm) Envelope Monarch (3-7/8 in. x 7-1/2 in.) Envelope (3-5/8 in. x 6-1/2 in.) U.S. Standard Fanfold (14-7/8 in. x 11 in.) German Standard Fanfold (8-1/2 in. x 12 in.) German Legal Fanfold (8-1/2 in. x 13 in.) B4 (ISO) 250 x 353 mm Japanese Postcard (100mm × 148mm) 9? × 11? 10? × 11? 15? × 11? Envelope Invite(220mm × 220mm) US Letter Extra 9 \275 x 12 in US Legal Extra 9 \275 x 15 in US Tabloid Extra 11.69 x 18 in A4 Extra 9.27 x 12.69 in Letter Transverse 8 \275 x 11 in A4 Transverse 210 x 297 mm Letter Extra Transverse 9\275 x 12 in SuperA/SuperA/A4 227 x 356 mm SuperB/SuperB/A3 305 x 487 mm US Letter Plus 8.5 x 12.69 in A4 Plus 210 x 330 mm A5 Transverse 148 x 210 mm B5 (JIS) Transverse 182 x 257 mm A3 Extra 322 x 445 mm A5 Extra 174 x 235 mm B5 (ISO) Extra 201 x 276 mm A2 420 x 594 mm A3 Transverse 297 x 420 mm A3 Extra Transverse 322 x 445 mm Japanese Double Postcard 200 x 148 mm A6 105 x 148 mm Japanese Envelope Kaku #2 Japanese Envelope Kaku #3 Japanese Envelope Chou #3 Japanese Envelope Chou #4 11in × 8.5in 420mm × 297mm 297mm × 210mm 210mm × 148mm B4 (JIS) Rotated 364 x 257 mm B5 (JIS) Rotated 257 x 182 mm Japanese Postcard Rotated 148 x 100 mm Double Japanese Postcard Rotated 148 x 200 mm A6 Rotated 148 x 105 mm Japanese Envelope Kaku #2 Rotated Japanese Envelope Kaku #3 Rotated Japanese Envelope Chou #3 Rotated Japanese Envelope Chou #4 Rotated B6 (JIS) 128 x 182 mm B6 (JIS) Rotated 182 x 128 mm 12 x 11 in Japanese Envelope You #4 Japanese Envelope You #4 Rotated PRC 16K 146 x 215 mm PRC 32K 97 x 151 mm PRC 32K(Big) 97 x 151 mm PRC Envelope #1 102 x 165 mm PRC Envelope #2 102 x 176 mm PRC Envelope #3 125 x 176 mm PRC Envelope #4 110 x 208 mm PRC Envelope #5 110 x 220 mm PRC Envelope #6 120 x 230 mm PRC Envelope #7 160 x 230 mm PRC Envelope #8 120 x 309 mm PRC Envelope #9 229 x 324 mm PRC Envelope #10 324 x 458 mm PRC 16K Rotated PRC 32K Rotated PRC 32K(Big) Rotated PRC Envelope #1 Rotated 165 x 102 mm PRC Envelope #2 Rotated 176 x 102 mm PRC Envelope #3 Rotated 176 x 125 mm PRC Envelope #4 Rotated 208 x 110 mm PRC Envelope #5 Rotated 220 x 110 mm PRC Envelope #6 Rotated 230 x 120 mm PRC Envelope #7 Rotated 230 x 160 mm PRC Envelope #8 Rotated 309 x 120 mm PRC Envelope #9 Rotated 324 x 229 mm PRC Envelope #10 Rotated 458 x 324 mm usual B3(13.9 x 19.7 in) Business Card(90mm x 55 mm) Thermal(3 x 11 in) Represents the custom paper size. Represents the way comments are printed with the sheet. Represents to print comments as displayed on sheet. Represents not to print comments. Represents to print comments at end of sheet. Represents to print comments as displayed on sheet include threaded comments. Represents print errors constants. Represents not to print errors. Represents to print errors as "--". Represents to print errors as displayed. Represents to print errors as "#N/A". Represent print order constants. Down, then over Over, then down Represents the printed chart size. Use full page. Scale to fit page. Custom. Encapsulates the object that represents a vertical page break. [C#] Workbook excel = new Workbook(); //Add a pagebreak at G5 excel.Worksheets[0].HorizontalPageBreaks.Add("G5"); excel.Worksheets[0].VerticalPageBreaks.Add("G5"); [VB] Dim excel as Workbook = new Workbook() 'Add a pagebreak at G5 excel.Worksheets(0).HorizontalPageBreaks.Add("G5") excel.Worksheets(0).VerticalPageBreaks.Add("G5") Gets the start row index of the vertical page break. Gets the end row index of the vertical page break. Gets the column index of the vertical page break. Encapsulates a collection of objects. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Gets the element with the specified cell name. Cell name. The element with the specified cell name. Adds a vertical page break to the collection. Start row index, zero based. End row index, zero based. Column index, zero based. object index. This method is used to add a vertical pagebreak within a print area. Adds a vertical page break to the collection. Cell column index, zero based. object index. Page break is added in the top left of the cell. Please set a horizontal page break and a vertical page break concurrently. Adds a vertical page break to the collection. Cell row index, zero based. Cell column index, zero based. object index. Page break is added in the top left of the cell. Please set a horizontal page break and a vertical page break concurrently. Adds a vertical page break to the collection. Cell name. object index. Page break is added in the top left of the cell. Please set a horizontal page break and a vertical page break concurrently. Removes the VPageBreak element at a specified name. Element index, zero based. Represents operation type when pasting range. No operation. Add Subtract Multiply Divide A specified range to be allowed to edit when the sheet protection is ON. Gets the Range title. This is used as a descriptor, not as a named range definition. Gets the object represents the cell area to be protected. Gets all referred areas. Returns all referred areas. Adds a referred area to this The start row. The start column. The end row. The end column. Indicates whether the worksheets is protected with password. Represents the password to protect the range. The security descriptor defines user accounts who may edit this range without providing a password to access the range. Encapsulates a collection of objects. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Adds a item to the collection. Range title. This is used as a descriptor, not as a named range definition. Start row index of the range. Start column index of the range. End row index of the range. End column index of the range. object index. Represents the various types of protection options available for a worksheet. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Allowing users to select locked cells of the worksheet worksheet.Protection.AllowSelectingLockedCell = true; //Allowing users to select unlocked cells of the worksheet worksheet.Protection.AllowSelectingUnlockedCell = true; [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() Dim worksheet As Worksheet = workbook.Worksheets(0) 'Allowing users to select locked cells of the worksheet worksheet.Protection.AllowSelectingLockedCell = True 'Allowing users to select unlocked cells of the worksheet worksheet.Protection.AllowSelectingUnlockedCell = True Copy protection info. Represents if the deletion of columns is allowed on a protected worksheet. The columns containing the cells to be deleted must be unlocked when the sheet is protected, and "Select unlocked cells" option must be enabled. Represents if the deletion of rows is allowed on a protected worksheet. The rows containing the cells to be deleted must be unlocked when the sheet is protected, and "Select unlocked cells" option must be enabled. Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected. Represents if the formatting of cells is allowed on a protected worksheet. Represents if the formatting of columns is allowed on a protected worksheet Represents if the formatting of rows is allowed on a protected worksheet Represents if the insertion of columns is allowed on a protected worksheet Represents if the insertion of hyperlinks is allowed on a protected worksheet Represents if the insertion of rows is allowed on a protected worksheet Represents if the sorting option is allowed on a protected worksheet. Represents if the user is allowed to manipulate pivot tables on a protected worksheet. Represents if the user is allowed to edit contents of locked cells on a protected worksheet. Represents if the user is allowed to manipulate drawing objects on a protected worksheet. Represents if the user is allowed to edit scenarios on a protected worksheet. Represents if the user is allowed to select locked cells on a protected worksheet. Represents if the user is allowed to select unlocked cells on a protected worksheet. Represents the password to protect the worksheet. If password is set to null or blank string, you can unprotect the worksheet or workbook without using a password. Otherwise, you must specify the password to unprotect the worksheet or workbook. Indicates whether the worksheets is protected with password. Verifies password. The password. Gets the hash of current password. Represents workbook/worksheet protection type. Represents to protect all. Represents to protect contents, used in Worksheet protection. Represents to protect objects, used in Worksheet protection. Represents to protect scenarios, used in Worksheet protection. Represents to protect structure, used in Workbook protection. Represents to protect window, used in Workbook protection. Represents no protection. Only for Reading property. Specifies write protection settings for a workbook. Gets and sets the author. Indicates if the Read Only Recommended option is selected. Indicates whether this workbook is write protected. Sets the protected password to modify the file. Returns true if the specified password is the same as the write-protection password the file was protected with. The specified password. Represents QueryTable information. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the first worksheet Worksheet worksheet = workbook.Worksheets[0]; //Getting the first query table in the worksheet if exists //QueryTable qt = worksheet.QueryTables[0]; //Getting display address of the query table. //string address = qt.ResultRange.Address; [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the first worksheet Dim worksheet As Worksheet = workbook.Worksheets(0) 'Getting the first query table in the worksheet QueryTable qt = worksheet.QueryTables[0]; 'Getting display address of the query table. string address = qt.ResultRange.Address; Gets the connection id of the query table. Gets the relate external connection. Gets the name of querytable. Gets the range of the result. Returns or sets the PreserveFormatting of the object. Returns or sets the AdjustColumnWidth of the object. A collection of objects that represent QueryTable collection information. Gets the querytable by the specific index. The index. The querytable Encapsulates the object that represents a range of cells within a spreadsheet. The Range class denotes a region of Excel spreadsheet. With this, you can format and set value of the range. And you can simply copy range of Excel too. The following example shows how to create a range and set value the range of Excel. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); // Get the first Worksheet Cells. Cells cells = workbook.Worksheets[0].Cells; // Create a range (A1:D3). Range range = cells.CreateRange("A1", "D3"); // Set value to the range. range.Value = "Hello"; //Save the Excel file workbook.Save("book1.xlsm"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Get the first Worksheet Cells. Dim cells as Cells = workbook.Worksheets[0].Cells 'Create a range (A1:D3). Dim range as Range = cells.CreateRange("A1", "D3") 'Set value to the range. range.Value = "Hello" 'Save the Excel file workbook.Save("book1.xlsm") Automaticall fill the target range. the target range. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); // Get the first Worksheet Cells. Cells cells = workbook.Worksheets[0].Cells; cells["A1"].PutValue(1); cells["A2"].PutValue(2); Aspose.Cells.Range source = cells.CreateRange("A1:A2"); Aspose.Cells.Range target = cells.CreateRange("A3:A10"); //fill 3,4,5....10 to the range A3:A10 source.AutoFill(target); //Save the Excel file workbook.Save("book1.xlsm"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook("Book1.xlsx") // Get the first Worksheet Cells. Dim cells as Cells = workbook.Worksheets[0].Cells cells("A1").PutValue(1) cells("A2").PutValue(2) Dim source as Aspose.Cells.Range = cells.CreateRange("A1:A2") Dim target as Aspose.Cells.Range = cells.CreateRange("A3:A10") 'fill 3,4,5....10 to the range A3:A10 source.AutoFill(target) 'Save the Excel file workbook.Save("book1.xlsm") Automaticall fill the target range. The targed range. The auto fill type. Returns a Range object that represents the current region. The current region is a range bounded by any combination of blank rows and blank columns. Gets all hyperlink in the range. Adds a hyperlink to a specified cell or a range of cells. Address of the hyperlink. The text to be displayed for the specified hyperlink. The screenTip text for the specified hyperlink. object. Gets the enumerator for cells in this Range. The cells enumerator When traversing elements by the returned Enumerator, the cells collection should not be modified(such as operations that will cause new Cell/Row be instantiated or existing Cell/Row be deleted). Otherwise the enumerator may not be able to traverse all cells correctly(some elements may be traversed repeatedly or skipped). [C#] Workbook workbook = new Workbook("template.xlsx"); Cells cells = workbook.Worksheets[0].Cells; IEnumerator en = cells.CreateRange("B2:C3").GetEnumerator(); while (en.MoveNext()) { Cell cell = (Cell)en.Current; Console.WriteLine(cell.Name + ": " + cell.Value); } Indicates whether the range is intersect. The range. Whether the range is intersect. If the two ranges area not in the same worksheet ,return false. Returns a object that represents the rectangular intersection of two ranges. The intersecting range. Returns a object If the two ranges are not intersected, returns null. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); // Get the first Worksheet Cells. Cells cells = workbook.Worksheets[0].Cells; Range range1 = cells.CreateRange("A1:A5"); Range range2 = cells.CreateRange("A3:A10"); //Get intersected range of the two ranges. Range intersectRange = range1.Intersect(range2); //Save the Excel file workbook.Save("book1.xlsm"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Get the first Worksheet Cells. Dim cells as Cells = workbook.Worksheets[0].Cells Range range1 = cells.CreateRange("A1:A5") Range range2 = cells.CreateRange("A3:A10") 'Get intersected range of the two ranges. Range intersectRange = range1.Intersect(range2) 'Save the Excel file workbook.Save("book1.xlsm") Returns the union result of two ranges. The range The union of two ranges. NOTE: This method is now obsolete. Instead, please use Range.UnionRanges() method. This method will be removed 12 months later since May 2024. Aspose apologizes for any inconvenience you may have experienced. Returns the union result of two ranges. The range The union of two ranges. Returns the union of two ranges. The range The union of two ranges. NOTE: This method is now obsolete. Instead, please use Range.UnionRanges() method. This method will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced. Gets the count of rows in the range. Gets the count of columns in the range. Gets or sets the name of the range. Named range is supported. For example,

range.Name = "Sheet1!MyRange";

Gets the range's refers to. Gets address of the range. Indicates whether the range contains values. Gets the distance, in points, from the left edge of column A to the left edge of the range. Gets the distance, in points, from the top edge of row 1 to the top edge of the range. Gets the width of a range in points. Gets the width of a range in points. Gets the index of the first row of the range. Gets the index of the first column of the range. Combines a range of cells into a single cell. Reference the merged cell via the address of the upper-left cell in the range. Unmerges merged cells of this range. Puts a value into the range, if appropriate the value will be converted to other data type and cell's number format will be reset. Input value True: converted to other data type if appropriate. True: set the number format to cell's style when converting to other data type Gets and sets the value of the range. If the range contains multiple cells, the returned/applied object should be a two-dimension object. Apply the cell style. The cell style. True, only overwriting formatting which is explicitly set. Applies formats for a whole range. The style object which will be applied. Flags which indicates applied formatting properties. Each cell in this range will contains a object. So this is a memory-consuming method. Please use it carefully. Sets the style of the range. The Style object. Sets the outline borders around a range of cells with same border style and color. Border style. Border color. Sets the outline borders around a range of cells with same border style and color. Border style. Border color. Sets out line borders around a range of cells. Border styles. Border colors. Both the length of borderStyles and borderStyles must be 4. The order of borderStyles and borderStyles must be top,bottom,left,right Sets outline border around a range of cells. Border edge. Border style. Border color. Sets outline border around a range of cells. Border edge. Border style. Border color. Set inside borders of the range. Inside borde type, only can be and . The border style. The color of the border. Sets or gets the column width of this range Sets or gets the height of rows in this range Move the current range to the dest range. The start row of the dest range. The start column of the dest range. Copies cell data (including formulas) from a source range. Source object. Copies cell value from a source range. Source object. Copies style settings from a source range. Source object. Copying the range with paste special options. The source range. The paste special options. Transpose (rotate) data from rows to columns or vice versa. Copies data (including formulas), formatting, drawing objects etc. from a source range. Source object. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); // Get the first Worksheet Cells. Cells cells = workbook.Worksheets[0].Cells; Range range1 = cells.CreateRange("A1:A5"); Range range2 = cells.CreateRange("A6:A10"); //Copy the range. range1.Copy(range2); //Save the Excel file workbook.Save("book1.xlsm"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Get the first Worksheet Cells. Dim cells as Cells = workbook.Worksheets[0].Cells Range range1 = cells.CreateRange("A1:A5") Range range2 = cells.CreateRange("A6:A10") //Copy the range range1.Copy(range2) 'Save the Excel file workbook.Save("book1.xlsm") Gets object in this range. Row offset in this range, zero based. Column offset in this range, zero based. object. Gets object or null in this range. Row offset in this range, zero based. Column offset in this range, zero based. object. Gets range by offset. Row offset in this range, zero based. Column offset in this range, zero based. Gets a Range object that represents the entire column (or columns) that contains the specified range. Gets a Range object that represents the entire row (or rows) that contains the specified range. Gets the object which contains this range. Returns a string represents the current Range object. Converts the range to image. The options for converting this range to image Convert the range to JSON value. The options of converting Convert the range to html . Options for coverting range to html. Exports data in this range to a object. Exported object. Exports data in this range to a object. The options of exporting range to datatable. Exported object. Exports data in this range to a object. Exported object. All data in the collection are converted to strings. Encapsulates a collection of objects. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Adds a item to the collection. Range object Represents a referred area by the formula. Indicates whether this is an external link. Get the external file name if this is an external reference. Indicates which sheet this reference is in. If it references to multiple worksheets, the returned value is just like the range expression in the formula. For example "Sheet1:Sheet3" for the reference in formula "=SUM(Sheet1:Sheet3!$A$1:$B$2)". Names of all the worksheets this instance references to. Indicates whether this area contains all columns(entire row). Indicates whether this area contains all rows(entire column). Indicates whether this is an area. If this is not an area, only StartRow and StartColumn effect. The end column of the area. The start column of the area. The end row of the area. The start row of the area. Gets cell values in this area. If this area is invalid, "#REF!" will be returned; If this area is one single cell, then return the cell value object; Otherwise return one 2D array for all values in this area. Gets cell values in this area. In this range, if there are some formulas that have not been calculated, this flag denotes whether those formulas should be calculated recursively If this area is invalid, "#REF!" will be returned; If this area is one single cell, then return the cell value object; Otherwise return one 2D array for all values in this area. Gets cell value with given offset from the top-left of this area. row offset from the start row of this area column offset from the start row of this area "#REF!" if this area is invalid; "#N/A" if given offset out of this area; Otherwise return the cell value at given position. Gets cell value with given offset from the top-left of this area. row offset from the start row of this area column offset from the start row of this area Whether calculate it recursively if the specified reference is formula "#REF!" if this area is invalid; "#N/A" if given offset out of this area; Otherwise return the cell value at given position. Returns the reference address of this area. Generally it is the address of the reference which may be used in formula, such as "Sheet1!A1:C3". the reference address of this area. Represents all referred cells and areas. Strategy option for duplicate names of columns. When processing data with headers, some scenarios require the headers to be no duplication for all columns. For example, when exporting data to a datatable and the header is required to be taken as datatable's column name, duplicated values of the header are invalid. For such kind of situations, user may determine how to handle them by specifying this strategy. Throws exception. Named with digit. Duplicated names will become ...1, ...2, etc. Named with letter.. Duplicated names will become ...A, ...B, etc. Represents how to loading the linked resource. Loads this resource as usual. Skips loading of this resource. Use stream provided by user Represents a cell value which contains an error. Represents the value of a cell containing a #BLOCKED! error. Represents the value of a cell containing a #BUSY! error. Represents the value of a cell containing a #CALC! error. Represents the value of a cell containing a #CONNECT! error. Represents the value of a cell containing a #NAME? error. Represents the value of a cell containing a #FIELD! error. Represents the value of a cell containing a #SPILL! error. Represents the value of a cell containing a #UNKNOWN! error. Represents the value of a cell containing a #TIMEOUT! error. Represents the value of a cell containing an #EXTERNAL! error. Represents a single row in a worksheet. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the first worksheet Worksheet worksheet = workbook.Worksheets[0]; Style style = workbook.CreateStyle(); //Setting the background color to Blue style.BackgroundColor = Color.Blue; //Setting the foreground color to Red style.ForegroundColor= Color.Red; //setting Background Pattern style.Pattern = BackgroundType.DiagonalStripe; //New Style Flag StyleFlag styleFlag = new StyleFlag(); //Set All Styles styleFlag.All = true; //Get first row Row row = worksheet.Cells.Rows[0]; //Apply Style to first row row.ApplyStyle(style, styleFlag); //Saving the Excel file workbook.Save("book1.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the first worksheet Dim worksheet As Worksheet = workbook.Worksheets(0) Dim style As Style = workbook.CreateStyle() 'Setting the background color to Blue style.BackgroundColor = Color.Blue 'Setting the foreground color to Red style.ForegroundColor = Color.Red 'setting Background Pattern style.Pattern = BackgroundType.DiagonalStripe 'New Style Flag Dim styleFlag As New StyleFlag() 'Set All Styles styleFlag.All = True 'Get first row Dim row as Row = worksheet.Cells.Rows(0) 'Apply Style to first row row.ApplyStyle(style, styleFlag) 'Saving the Excel file workbook.Save("book1.xls") Get the cell by specific index in the cells collection of this row. The index(position) of the cell in the cells collection of this row. The Cell object at given position. To traverse all cells in sequence without modification, using will give better performance than using this method to get cell one by one. Indicates whether the row contains any data Gets the cell. The column index Gets the cells enumerator The cells enumerator [C#] Workbook workbook = new Workbook("template.xlsx"); Cells cells = workbook.Worksheets[0].Cells; IEnumerator en = cells.Rows[1].GetEnumerator(); while (en.MoveNext()) { Cell cell = (Cell)en.Current; Console.WriteLine(cell.Name + ": " + cell.Value); } Gets an enumerator that iterates cells through this row. whether enumerate cells in reversed order whether the returned enumerator should check the modification of cells in this row and keep synchronized with it. The cell enumerator If the row will be modified(by operations that may cause new Cell be instantiated or existing Cell be removed) during the traversal with the enumerator, synchronized enumerator should be used instead of normal enumerator so that the traversal can continue from the position just after the one has been traversed by the last MoveNext(). However, together with the advantage that no element be skipped or traversed repeatedly, the disadvantage for synchronized enumerator is that the performance will be degraded a bit when comparing with normal enumerator. Gets the cell or null in the specific index. The column index Returns the cell object if the cell exists. Or returns null if the cell object does not exist. whether the row is collapsed Gets and sets the row height in unit of Points. Indicates whether the row is hidden. Gets the index of this row. Gets the group level of the row. Indicates whether the row height matches current default font setting of the workbook. True of this property also denotes the row height is "automatic" without custom height value set by user. When this property is true, if the content in this row changes, generally the row height needs to be re-calculated(such as by ) to get the same result with what is shown in ms excel when you opening the workbook in it. Gets the style of this row. Modifying the returned style object directly takes no effect for this row or any cells in this row. You have to call or method to apply the change to this row.

Row's style is the style which will be inherited by cells in this row(those cells that have no custom style settings, such as existing cells that have not been set style explicitly, or those that have not been instantiated)
Sets the style of this row. the style to be used as the default style for cells in this row. This method only sets the given style as the default style for this row, without changing the style settings for existing cells in this row. To update style settings of existing cells to the specified style at the same time, please use Indicates whether this row has custom style settings(different from the default one inherited from workbook). Copy settings of row, such as style, height, visibility, ...etc. the source row whose settings will be copied to this one whether check and gather style. Only takes effect and be needed when two row objects belong to different workbook and the styles of two workbooks are different. Gets the first cell object in the row. Gets the first non-blank cell in the row. Gets the last cell object in the row. Gets the last non-blank cell in the row. Applies formats for a whole row. The style object which will be applied. Flags which indicates applied formatting properties. Checks whether this object refers to the same row with another. another object true if two objects refers to the same row. Checks whether this object refers to the same row with another row object. another row object true if two row objects refers to the same row. Collects the objects that represent the individual rows in a worksheet. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the first worksheet Worksheet worksheet = workbook.Worksheets[0]; //Get first row Row row = worksheet.Cells.Rows[0]; [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the first worksheet Dim worksheet As Worksheet = workbook.Worksheets(0) 'Get first row Dim row as Row = worksheet.Cells.Rows(0) Gets the number of rows in this collection. Gets an enumerator that iterates rows through this collection enumerator [C#] Workbook workbook = new Workbook("template.xlsx"); Cells cells = workbook.Worksheets[0].Cells; IEnumerator en = cells.Rows.GetEnumerator(); while (en.MoveNext()) { Row row = (Row)en.Current; Console.WriteLine(row.Index + ": " + row.Height); } Gets an enumerator that iterates rows through this collection whether enumerate rows in reversed order whether the returned enumerator should check the modification of row collection and keep synchronized with it. The row enumerator If the row collection will be modified(by operations that may cause new Row be instantiated or existing Row be removed) during the traversal with the enumerator, synchronized enumerator should be used instead of normal enumerator so that the traversal can continue from the position just after the one has been traversed by the last MoveNext(). However, together with the advantage that no element be skipped or traversed repeatedly, the disadvantage for synchronized enumerator is that the performance will be degraded a bit when comparing with normal enumerator. Gets the row object by the position in the list. The position. The Row object at given position. Gets a object by given row index. The Row object of given row index will be instantiated if it does not exist before. Clear all rows and cells. Remove the row item at the specified index(position) in this collection. zero-based index(position, not ) of the existing row item in this collection. Represents the options of saving dif file. Creates the options for saving DIF file. Represents options of saving .docx file. Represents options of saving .docx file. Represents options of saving .docx file. If True, the workbook will be converted into some pictures of .docx file. If False, the workbook will be converted into some tables of .docx file. Represents the options for exporting html data. Export file to html which only contains table part. Export all the data to html. Represents the type of target attribute in HTML tag. Opens the linked document in a new window or tab Opens the linked document in the parent frame Opens the linked document in the same frame as it was clicked (this is default) Opens the linked document in the full body of the window Represents the options for saving html file. Creates options for saving html file. Creates options for saving htm file. The file format. It should be one of following types: or , otherwise the saved format will be set as automatically. Indicate whether exporting those not visible shapes The default values is false. The title of the html page. Only for saving to html stream. The directory that the attached files will be saved to. Only for saving to html stream. Specify the Url prefix of attached files such as image in the html file. Only for saving to html stream. Specify the default font name for exporting html, the default font will be used when the font of style is not existing, If this property is null, Aspose.Cells will use universal font which have the same family with the original font, the default value is null. Indicates whether to add a generic font to CSS font-family. The default value is true Indicates if zooming in or out the html via worksheet zoom level when saving file to html, the default value is false. Indicates if exporting comments when saving file to html, the default value is false. Represents type of exporting comments to html files. Indicates if disable Downlevel-revealed conditional comments when exporting file to html, the default value is false. Indicates whether exporting image files to temp directory. Only for saving to html stream. Indicates whether using scalable unit to describe the image width when using scalable unit to describe the column width. The default value is true. Indicates whether exporting column width in unit of scale to html. The default value is false. Indicates whether exporting the single tab when the file only has one worksheet. The default value is false. Specifies whether images are saved in Base64 format to HTML, MHTML or EPUB. When this property is set to true image data is exported directly on the img elements and separate files are not created. Indicates if only exporting the active worksheet to html file. If true then only the active worksheet will be exported to html file; If false then the whole workbook will be exported to html file. The default value is false. Indicates if only exporting the print area to html file. The default value is false. Gets or Sets the exporting CellArea of current active Worksheet. If you set this attribute, the print area of current active Worksheet will be omitted. Only the specified area will be exported when saving the file to html. Indicates whether html tag(such as <div></div>) in cell should be parsed as cell value or preserved as it is. The default value is true. Indicates if a cross-cell string will be displayed in the same way as MS Excel when saving an Excel file in html format. By default the value is Default, so, for cross-cell strings, there is little difference between the html files created by Aspose.Cells and MS Excel. But the performance for creating large html files,setting the value to Cross would be several times faster than setting it to Default or Fit2Cell. Hidden column(the width of this column is 0) in excel,before save this into html format, if HtmlHiddenColDisplayType is "Remove",the hidden column would not been output, if the value is "Hidden", the column would been output,but was hidden,the default value is "Hidden" Hidden row(the height of this row is 0) in excel,before save this into html format, if HtmlHiddenRowDisplayType is "Remove",the hidden row would not been output, if the value is "Hidden", the row would been output,but was hidden,the default value is "Hidden" If not set,use Encoding.UTF8 as default enconding type. Gets or sets the ExportObjectListener for exporting objects. NOTE: This property is now obsolete. Instead, please use HtmlSaveOptions.IStreamProvider property. This property will be removed 12 months later since August 2015. Aspose apologizes for any inconvenience you may have experienced. Gets or sets the IFilePathProvider for exporting Worksheet to html separately. Gets or sets the IStreamProvider for exporting objects. Get the ImageOrPrintOptions object before exporting Indicates whether save the html as single file. The default value is false. If there are multiple worksheets or other required resources such as pictures in the workbook, commonly those worksheets and other resources need to be saved into separate files. For some scenarios, user maybe need to get only one resultant file such as for the convenience of transferring. If so, user may set this property as true. Indicates whether showing all sheets when saving as a single html file. Only works when is True. Indicates whether exporting page headers. Only works when is True. Indicates whether exporting page headers. Only works when is True. Indicating if exporting the hidden worksheet content.The default value is true. Indicating if html or mht file is presentation preference. The default value is false. if you want to get more beautiful presentation,please set the value to true. Gets and sets the prefix of the css name,the default value is "". Gets and sets the prefix of the type css name such as tr,col,td and so on, they are contained in the table element which has the specific TableCssId attribute. The default value is "". Indicating whether using full path link in sheet00x.htm,filelist.xml and tabstrip.htm. The default value is false. Indicating whether export the worksheet css separately.The default value is false. Indicating whether exporting the similar border style when the border style is not supported by browsers. If you want to import the html or mht file to excel, please keep the default value. The default value is false. Indicates whether merging empty TD element forcedly when exporting file to html. The size of html file will be reduced significantly after setting value to true. The default value is false. If you want to import the html file to excel or export perfect grid lines when saving file to html, please keep the default value. The option to merge contiguous empty cells(empty td elements) The default value is MergeEmptyTdType.Default. Indicates whether exporting excel coordinate of nonblank cells when saving file to html. The default value is false. If you want to import the output html to excel, please keep the default value. Indicates whether exporting extra headings when the length of text is longer than max display column. The default value is false. If you want to import the html file to excel, please keep the default value. Indicates whether exports sheet's row and column headings when saving to HTML files. NOTE: This member is now obsolete. Instead, please use HtmlSaveOptions.ExportRowColumnHeadings property. This property will be removed 12 months later since June 2022. Aspose apologizes for any inconvenience you may have experienced. Indicates whether exports sheet's row and column headings when saving to HTML files. The default value is false. Indicates whether exporting formula when saving file to html. The default value is true. If you want to import the output html to excel, please keep the default value. Indicates whether adding tooltip text when the data can't be fully displayed. The default value is false. Indicating whether exporting the gridlines.The default value is false. Indicating whether exporting bogus bottom row data. The default value is true.If you want to import the html or mht file to excel, please keep the default value. Indicating whether excludes unused styles. For the generated html files, excluding unused styles can make the file size smaller without affecting the visual effects. So the default value of this property is true. If user needs to keep all styles in the workbook for the generated html(such as the scenario that user needs to restore the workbook from the generated html later), please set this property as false. Indicating whether exporting document properties.The default value is true.If you want to import the html or mht file to excel, please keep the default value. Indicating whether exporting worksheet properties.The default value is true.If you want to import the html or mht file to excel, please keep the default value. Indicating whether exporting workbook properties.The default value is true.If you want to import the html or mht file to excel, please keep the default value. Indicating whether exporting frame scripts and document properties. The default value is true.If you want to import the html or mht file to excel, please keep the default value. Indicating the rule of exporting html file data.The default value is All. Indicating the type of target attribute in <a> link. The default value is HtmlLinkTargetType.Parent. Indicating whether the output HTML is compatible with IE browser. The defalut value is false Indicating whether show the whole formatted data of cell when overflowing the column. If true then ignore the column width and the whole data of cell will be exported. If false then the data will be exported same as Excel. The default value is false. Indicates whether to calculate formulas before saving html file. The default value is false. Indicates whether JavaScript is compatible with browsers that do not support JavaScript. The default value is true. Indicates whether the output HTML is compatible with mobile devices. The default value is false. Gets or sets the additional css styles for the formatter. Only works when is True. CssStyles="body { padding: 5px }"; Indicates whether to hide overflow text when the cell format is set to wrap text. The default value is false Indicates whether the table borders are collapsed. The default value is true. Indicates whether the html character entities are replaced with decimal code. (e.g. "&nbsp;" is replaced with "&#160;"). The default value is false. Indicates how export OfficeMath objects to HTML, Default value is Image. Specifies the attribute that indicates the CellName to be written. (e.g. If the value is "id", then for cell "A1", the output will be:<td id='A1'>). The default value is null. Indicates whether only inline styles are applied, without relying on CSS. The default value is false. Optimize the output of html by using CSS custom properties. For example, for the scenario that there are multiple occurences for one base64 image, with custom property the image data only needs to be saved once so the performance of the resultant html can be improved. The default value is false. Specifies version of HTML standard that should be used when saving the HTML format. Default value is HtmlVersion.Default. Indicates the version of HTML is used when saving to Html formats. Save the document in compliance with the MS Excel exporting HTML. Saves the document in compliance with the XHTML 1.0 Transitional standard. Saves the document in compliance with the HTML 5 standard. Represents image save options. For advanced usage, please use or . Creates the options for saving image file. The default type is Tiff. Creates the options for saving image file. The file format. It should be one of following types: , , , , , or , otherwise the saved format will be set as automatically. Additional image creation options. For advanced usage, please use or . Gets or sets the IStreamProvider for exporting objects. If saving as Tiff, this property is ignored. Otherwise, if more than one image should be saving, we will write other images by this. For advanced usage, please use or . Represents the options of saving the workbook as a json file. Creates options for saving json file. Represents the type of exporting hyperlink to json. The default value is ; Indicates whether skipping emtpy rows. Represents the indexes of exported sheets. The original json schema of each worksheet. Gets or sets the exporting range. Indicates whether the range contains header row. Exports the string value of the cells to json. Indicates the indent. If the indent is null or empty, the exported json is not formatted. Exported as parent-child hierarchy Json structure. Indicates whether exporting empty cells as null. Indicates whether always exporting excel to json as object, even there is only a worksheet in the file. Indicates whether converting to json struct of the Excel file. Only for converting range to JSON. Represents the save options for markdown. Creates options for saving markdown document Gets and sets the default encoding. Gets and sets the format strategy when exporting the cell value as string. The Data provider to provide cells data for saving workbook in light mode. Gets and sets the line separator. Gets and sets how set the header of the table. Gets or sets the sheets to render. Default is all visible sheets in the workbook: . The set is ignored when it is used in Represents the merge type for empty TD element when exporting file to html. Display like MS Excel. Empty TD elements will not be merged when exporting file to html. This will generate a significantly larger html file. Merging empty TD element forcedly when exporting file to html. The size of html file will be reduced significantly after setting value to true. If you want to import the html file to excel or export perfect grid lines when saving file to html, please keep the default value. Represents the options of saving ods file. Creates the options of saving ods file. Creates the options of saving ods file. The file format. It should be , , or , otherwise the saved format will be set as automatically. Gets and sets the generator of the ods file. Indicates whether the ods file should be saved as ODF format version 1.1. Default is false. NOTE: This member is now obsolete. Instead, please use OdsSaveOptions.OdfStrictVersion property. This method will be removed 12 months later since February 2024. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the ODF version. Indicates whether saving pivot tables. The pivot table feature of OpenOffice has fewer settings compared to Excel, so their results of pivot table have many differences. Sometimes it's better to ingore these pivot tables when saving .ods file. Allows to specify which OOXML specification will be used when saving in the Xlsx format. ECMA-376 1st Edition, 2006. ISO/IEC 29500:2008 Strict compliance level. The Ooxml compression type The fastest but least effective compression. A little slower, but better, than level 1. A little slower, but better, than level 2. A little slower, but better, than level 3. A little slower than level 4, but with better compression. A good balance of speed and compression efficiency. Pretty good compression! Better compression than Level7! The "best" compression, where best means greatest reduction in size of the input data stream. This is also the slowest compression. Represents the options of saving office open xml file. Creates the options for saving office open xml file. Creates the options for saving office open xml file. The file format. It should be one of following types: , , , or , otherwise the saved format will be set as automatically. Indicates if export cell name to Excel2007 .xlsx (.xlsm, .xltx, .xltm) file. If the output file may be accessed by SQL Server DTS, this value must be true. Setting the value to false will highly increase the performance and reduce the file size when creating large file. Default value is true. The data provider for saving workbook in light mode. Indicates whether update scaling factor before saving the file if the PageSetup.FitToPagesWide and PageSetup.FitToPagesTall properties control how the worksheet is scaled. The default value is false for performance. Always use ZIP64 extensions when writing zip archives, even when unnecessary. Indicates whether embedding Ooxml files of OleObject as ole object. Only for OleObject. Gets and sets the compression type for ooxml file. The default value is OoxmlCompressionType.Level2. Indicates whether to make the xls more compatible with WPS. Represents the options for pagination. When characters in the Excel are Unicode and not be set with correct font in cell style, They may appear as block in pdf,image. Set the DefaultFont such as MingLiu or MS Gothic to show these characters. If this property is not set, Aspose.Cells will use system default font to show these unicode characters. When characters in the Excel are Unicode and not be set with correct font in cell style, They may appear as block in pdf,image. Set this to true to try to use workbook's default font to show these characters first. Default is true. Indicates whether to check font compatibility for every character in text. The default value is true. Disable this property may give better performance. But when the default or specified font of text/character cannot be used to render it, unreadable characters(such as block) maybe occur in the generated pdf. For such situation user should keep this property as true so that alternative font can be searched and used to render the text instead; Indicates whether to only substitute the font of character when the cell font is not compatibility for it. Default is false. We will try default font of Workbook and PdfSaveOption/system for cell font first. If OnePagePerSheet is true , all content of one sheet will output to only one page in result. The paper size of pagesetup will be invalid, and the other settings of pagesetup will still take effect. If AllColumnsInOnePagePerSheet is true , all column content of one sheet will output to only one page in result. The width of paper size of pagesetup will be ignored, and the other settings of pagesetup will still take effect. Indicates if you need to hide the error while rendering. The error can be error in shape, image, chart rendering, etc. Indicates whether to output a blank page when there is nothing to print. Default is true. Gets or sets the 0-based index of the first page to save. Default is 0. The following example shows how to render a range of pages (3 and 4) in a Microsoft Excel file to PDF. //Open an Excel file Workbook wb = new Workbook("Book1.xlsx"); PdfSaveOptions options = new PdfSaveOptions(); //Print only Page 3 and Page 4 in the output PDF //Starting page index (0-based index) options.PageIndex = 3; //Number of pages to be printed options.PageCount = 2; //Save the PDF file wb.Save("output.pdf", options); Gets or sets the number of pages to save. Default is System.Int32.MaxValue which means all pages will be rendered.. The following example shows how to render a range of pages (3 and 4) in a Microsoft Excel file to PDF. //Open an Excel file Workbook wb = new Workbook("Book1.xlsx"); PdfSaveOptions options = new PdfSaveOptions(); //Print only Page 3 and Page 4 in the output PDF //Starting page index (0-based index) options.PageIndex = 3; //Number of pages to be printed options.PageCount = 2; //Save the PDF file wb.Save("output.pdf", options); Indicates which pages will not be printed. If content in the sheet is sparse, there will be some pages are totally blank in the output pdf file. If you don't want these blank pages, you can use this option to omit them. The following code omits blank pages or pages which only contains some style content like cell background, borders. Workbook wb = new Workbook("Book1.xlsx"); PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); //ignore blank pages pdfSaveOptions.PrintingPageType = PrintingPageType.IgnoreBlank; wb.Save("output_ignore_blank_page.pdf", pdfSaveOptions); //ignore blank pages and pages which only contains some style content like cell background pdfSaveOptions.PrintingPageType = PrintingPageType.IgnoreStyle; wb.Save("output_ignore_blank_and_style_page.pdf", pdfSaveOptions); Gets or sets gridline type. Default is Dotted type. Gets or sets displaying text type when the text width is larger than cell width. Gets or sets default edit language. It may display/render different layouts for text paragraph when different edit languages is set. Default is . Gets or sets the sheets to render. Default is all visible sheets in the workbook: . The following code only renders active sheet to pdf. Workbook workbook = new Workbook("Book1.xlsx"); int activeSheetIndex = workbook.Worksheets.ActiveSheetIndex; PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); //set active sheet index to sheet set. pdfSaveOptions.SheetSet = new SheetSet(new int[] { activeSheetIndex }); workbook.Save("output.pdf", pdfSaveOptions); Implements this interface to get DrawObject and Bound when rendering. Control/Indicate progress of page saving process. Setting for rendering Emf metafile. EMF metafiles identified as "EMF+ Dual" can contain both EMF+ records and EMF records. Either type of record can be used to render the image, only EMF+ records, or only EMF records. When is set, then EMF+ records will be parsed while rendering to page, otherwise only EMF records will be parsed. Default value is . Represents the options for saving Pcl file. Creates the options for saving pdf file. Adds information about font that is already added to the printer by manufacturer. Full name of the font (e.g. "Times New Roman Bold Italic") used in the source file. Name of the font that will be used in the output Pcl document. There are 52 fonts that are to be built in any printer according to Pcl specification. However manufactures can add some other fonts to their devices. Represents the options for saving pdf file. Creates the options for saving pdf file. True to embed true type fonts. Affects only ASCII characters 32-127. Fonts for character codes greater than 127 are always embedded. Fonts are always embedded for PDF/A-1a, PDF/A-1b standard. Default is true. Gets and sets the PdfBookmarkEntry object. Gets or sets the PDF standards compliance level for output documents. Default is Pdf17. Set this options, when security is need in xls2pdf result. The following code sets hight resolution print permisson for the output pdf. Workbook wb = new Workbook(); wb.Worksheets[0].Cells["A1"].Value = "Aspose"; PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); PdfSecurityOptions pdfSecurityOptions = new PdfSecurityOptions(); //set owner password pdfSecurityOptions.OwnerPassword = "YourOwnerPassword"; //set user password pdfSecurityOptions.UserPassword = "YourUserPassword"; //set print permisson pdfSecurityOptions.PrintPermission = true; //set high resolution for print pdfSecurityOptions.FullQualityPrintPermission = true; pdfSaveOptions.SecurityOptions = pdfSecurityOptions; wb.Save("output.pdf", pdfSaveOptions); Represents the image type when converting the chart and shape . NOTE: This member is now obsolete. Instead, Chart and Shape are always rendered as vector elements(e.g. point, line) for rendering quality. This property will be removed 12 months later since June 2022. Aspose apologizes for any inconvenience you may have experienced. Indicates whether to calculate formulas before saving pdf file. The default value is false. Indicate the compression algorithm Sets desired PPI(pixels per inch) of resample images and jpeg quality. All images will be converted to JPEG with the specified quality setting, and images that are greater than the specified PPI (pixels per inch) will be resampled. Desired pixels per inch. 220 high quality. 150 screen quality. 96 email quality. 0 - 100% JPEG quality. The following code sets desired PPI as 96 and jpeg quality as 80 for images in the output pdf. //load the source file with images. Workbook wb = new Workbook("Book1.xlsx"); PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); //set desired PPI as 96 and jpeg quality as 80. pdfSaveOptions.SetImageResample(96, 80); wb.Save("output.pdf", pdfSaveOptions); Gets and sets the time of generating the pdf document. if it is not be set, it will be the time of generating the pdf. Gets and sets producer of generated pdf document. If the value is null, or a valid LICENSE is not set, string Aspose.Cells vVERSION will be used. Gets and sets pdf optimization type. Default value is Gets or sets a value determining the way are exported to PDF file. Default value is None. Indicates whether to export document structure. Indicates whether the window's title bar should display the document title. If false, the title bar should instead display the name of the PDF file. Default value is false. Gets or sets embedded font encoding in pdf. Default value is Gets or sets watermark to output. The following code sets watermark in the output pdf. //prepare a workbook with 3 pages. Workbook wb = new Workbook(); wb.Worksheets[0].Cells["A1"].PutValue("Page1"); int index = wb.Worksheets.Add(); wb.Worksheets[index].Cells["A1"].PutValue("Page2"); index = wb.Worksheets.Add(); wb.Worksheets[index].Cells["A1"].PutValue("Page3"); wb.Worksheets[index].PageSetup.PaperSize = PaperSizeType.PaperA3; //create a font for watermark, and specify bold, italic, color RenderingFont font = new RenderingFont("Calibri", 68); font.Italic = true; font.Bold = true; font.Color = Color.Blue; //create a watermark from text and the specified font RenderingWatermark watermark = new RenderingWatermark("Watermark", font); //specify horizontal and vertical alignment watermark.HAlignment = TextAlignmentType.Center; watermark.VAlignment = TextAlignmentType.Center; //specify rotation watermark.Rotation = 30; //specify opacity watermark.Opacity = 0.6f; //specify the scale to page(e.g. 100, 50) in percent. watermark.ScaleToPagePercent = 50; //spcify watermark for rendering to pdf. PdfSaveOptions options = new PdfSaveOptions(); options.Watermark = watermark; wb.Save("output_watermark.pdf", options); Indicates whether to embed attachment for Ole objects in Excel. Default value is false. The value must be false when PDF/A compliance is set or pdf encryption is enabled. Represents the pptx save options. Represents the pptx save options. Represents options of saving .pptx file. If True, the workbook will be converted into some pictures of .pptx file. If False, the workbook will be converted into some tables of .pptx file. Inidicates whether ignoring hidden rows when converting Excel to PowerPoint. Represents what type of line needs to be adjusted size of font if height of row is small. Gets and sets the display type when exporting to PowerPoint. The default exporting type is working as printing. Represents the format in which the workbook is saved. Comma-Separated Values(CSV) text file. Comma-Separated Values(CSV) text file. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Represents an xlsx file. Represents an xlsm file which enable macros. Represents an xltx file. Represents an xltm file which enable macros. Represents an xltm file which enable addin macros. Tab-Separated Values(TSV) text file. Tab-Separated Values(TSV) text file. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Represents a tab delimited text file, same with . Represents a html file. Represents a mhtml file. Open Document Sheet(ODS) file. Open Document Sheet(ODS) file. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Represents an Excel97-2003 xls file. Represents an Excel 2003 xml file. Represents an xlsb file. If saving the file to the disk,the file format accords to the extension of the file name. If saving the file to the stream, the file format is xlsx. Represents unrecognized format, cannot be saved. Represents a Pdf file. XPS (XML Paper Specification) format. XPS (XML Paper Specification) format. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Represents a TIFF file. Represents a TIFF file. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. SVG file. SVG file. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Data Interchange Format. Open Document Template Sheet(OTS) file. Excel 97-2003 template file. Represents a simple xml file. Represents a numbers file. Not supported. Represents markdown document. Represents OpenDocument Flat XML Spreadsheet (.fods) file format. Represents OpenDocument Flat XML Spreadsheet (.fods) file format. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Represents StarOffice Calc Spreadsheet (.sxc) file format. Represents StarOffice Calc Spreadsheet (.sxc) file format. NOTE: This member is now obsolete. Instead, please use property. This property will be removed 6 months later since April 2021. Aspose apologizes for any inconvenience you may have experienced. Represents .pptx file. Represents .docx file. Windows Enhanced Metafile. JPEG JFIF. Portable Network Graphics. Windows Bitmap Gif Json Sql Rrepesents XHtml file. please use property. This property will be removed 6 months later since March 2025. Aspose apologizes for any inconvenience you may have experienced. Represents Epub file. Represents Azw3 file. PCL (Printer Command Language) Xbase Data file Represents all save options Gets the save file format. Make the workbook empty after saving the file. The cached file folder is used to store some large data. Indicates whether validate merged cells before saving the file. The default value is false. Indicates whether merge the areas of conditional formatting and validation before saving the file. The default value is false. If true and the directory does not exist, the directory will be automatically created before saving the file. The default value is false. Indicates whether sorting defined names before saving file. Indicates whether sorting external defined names before saving file. Indicates whether refreshing chart cache data Gets or sets warning callback. Whether check restriction of excel file when user modify cells related objects. For example, excel does not allow inputting string value longer than 32K. When you input a value longer than 32K, it will be truncated. Indicates whether updating smart art setting. The default value is false. Only effects after calling Shape.GetResultOfSmartArt() method and the cached shapes exist in the template file. Indicates whether encrypt document properties when saving as .xls file. The default value is true. Only for .xls,xlsx,xlsb and xlsm file. Represents the options for saving Excel 2003 spreadml file. Creates the options for saving Excel 2003 spreadml file. Creates the options for saving Excel 2003 spreadml file. The save format. NOTE: This constructor is now obsolete. Instead, please use SpreadsheetML2003SaveOptions() constructor. This property will be removed 12 months later since January 2021. Aspose apologizes for any inconvenience you may have experienced. Causes child elements to be indented. The default value is true. If the value is false, it will reduce the size of the xml file Limit as xls, the max row index is 65535 and the max column index is 255. The default value is false, it means that column index will be ignored if the cell is contiguous to the previous cell. Represents Svg save options. For advanced usage, please use or . NOTE: This class is now obsolete. Instead, please use ImageSaveOptions class. This property will be removed 12 months later since March 2023. Aspose apologizes for any inconvenience you may have experienced. Creates the options for saving svg file. NOTE: This class is now obsolete. Instead, please use ImageSaveOptions class. This property will be removed 12 months later since March 2023. Aspose apologizes for any inconvenience you may have experienced. Creates the options for saving svg file. The file format. It must be svg. NOTE: This constructor is now obsolete. Instead, please use SvgSaveOptions() constructor. This property will be removed 12 months later since August 2022. Aspose apologizes for any inconvenience you may have experienced. Gets and sets which worksheet should be exported. If the value is -1, the active worksheet will be exported. NOTE: This class is now obsolete. Instead, please use ImageSaveOptions class. This property will be removed 12 months later since March 2023. Aspose apologizes for any inconvenience you may have experienced. Represents the save options for csv/tab delimited/other text format. Creates text file save options. Creates text file save options. The file format. It should be or , otherwise the saved format will be set as automatically. Gets and sets char Delimiter of text file. Gets and sets a string value as separator. Gets and sets the default encoding. Indicates whether always adding '"' for each field. If true then all values will be quoted; If false then values will only be quoted when needed(for example, when values contain special characters such as '"' , '\n' or separator character). Default is false. NOTE: This member is now obsolete. Instead, please use QuoteType property instead. This property will be removed 12 months later since August 2012. Aspose apologizes for any inconvenience you may have experienced. Gets or sets how to quote values in the exported text file. Gets and sets the format strategy when exporting the cell value as string. The data provider for saving workbook in light mode. Indicates whether leading blank rows and columns should be trimmed like what ms excel does. Default is true. Same with the rule in ms excel, a row/column will not be taken as blank if it has custom style, even if it contains no cell data. When saving with LightCells mode, this option takes no effect. User should control the output range by the implementation of or by speicifing Indicates whether tailing blank cells in one row should be trimmed. Default is false. When saving with LightCells mode and the has not been specified, this option takes no effect and one row will be extended to just the last cell provided by the implementation Indicates whether separators should be output for blank row. Default value is false so by default the content for blank row will be empty. The range of cells to be exported. If the exported area has been specified, will takes no effect. Indicates whether the single quote sign should be exported as part of the value of one cell when is true for it. Default is false. Indicates whether exporting all sheets to the text file. If it is false, only export the activesheet, just like MS Excel. The defult value is false. Specifies the type of using quotation marks for values in text format files. All values that contain special characters such as quotation mark, separator character will be quoted. Same with the behavior of ms excel for exporting text file. All values will be quoted always. Only quote values when needed. Such as, if one value contains quotation mark but the quotation mark is not at the begin of this value, this value will not be quoted. All values will not be quoted. The exported text file with this type may not be read back correctly because the needed quotation marks being absent. Represents the options for saving xlsb file. Creates xlsb file save options. Creates xlsb file save options. The save format . It must be xlsb. NOTE: This constructor is now obsolete. Instead, please use XlsbSaveOptions() constructor. This property will be removed 12 months later since January 2021. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the compression type for ooxml file. The default value is OoxmlCompressionType.Level6. Indicates whether exporting all column indexes for cells. The default value is true. The data provider for saving workbook in light mode. Represents the save options for the Excel 97-2003 file format: xls and xlt. Creates options for saving Excel 97-2003 xls file. Creates options for saving Excel 97-2003 xls/xlt file. The file format. It should be or , otherwise the saved format will be set as automatically. The data provider for saving workbook in light mode. Indicates whether saving a template file. NOTE: This member is now obsolete. Instead, please create XlsSaveOptions with corresponding save format(xlt for true and xls for false). This method will be removed 12 months later since August 2020. Aspose apologizes for any inconvenience you may have experienced. Indicates whether matching font color because there are 56 colors in the standard color palette. Indicates whether to make the xls more compatible with WPS. Represents the options of saving the workbook as an xml file. Creates options for saving xml file. Represents the indexes of exported sheets. Gets or sets the exporting range. Indicates whether the range contains header row. Indicates whether exporting xml map in the file. Indicates whether exporting sheet's name as the name of the element. Indicates whether exporting data as attributes of element. Represents the additional options when saving the file as the Xps. Creates options for saving xps file. Creates options for saving xps file. The save format, it must be xps format. NOTE: This constructor is now obsolete. Instead, please use XpsSaveOptions() constructor. This property will be removed 12 months later since August 2022. Aspose apologizes for any inconvenience you may have experienced. Represents an individual scenario. Gets and sets the comment of scenario. Gets and sets the name of scenario. Gets name of user who last changed the scenario. Indicates whether scenario is hidden. Indicates whether scenario is locked for editing when the sheet is protected. Gets the input cells of scenario. Represents the list of scenarios. Gets and sets which scenario is selected. Indicates which scenario was last selected by the user to be run/shown. Gets the object by the index. The specific index in the list. Adds a scenario. The name of scenario. The index in the list of scenarios. Represents input cell for the scenario. Gets and sets the row index of the input cell. Gets and sets the column index of the input cell. Gets and sets the input cell address. Gets and sets value of the input cell. Indicates whether input cell is deleted. Represents the list of the scenario's input cells. Gets by index in the list. The specific index in the list The object Adds an input cell. The row index of input cell. The column index of input cell. The value of input cell. Represents the globalization settings. Compares two string values according to certain collation rules. the first string the second string whether ignore case when comparing values Integer that indicates the lexical relationship between the two comparands Transforms the string into a comparable object according to certain collation rules. String value needs to be compared with others. whether ignore case when comparing values Object can be used to compare or sort string values Settings for the default values of workbook's style properties. Indicates whether property for number format is preferrable when the style defines both built-in number and custom pattern. Default value is false, that means by default custom pattern will be used to format values as long as it is not empty for one style. When loading workbook from existing template file, maybe both built-in number and custom pattern are defined for one style. This property determine whether we should use the built-in number or the custom pattern when formatting values with the style. Gets/Sets the default font name for the workbook Gets/Sets the default standard font size for the workbook. Gets/Sets the default value for horizontal alignment Gets/Sets the default value for vertical alignment Settings of formulas and calculation. Indicates whether the application is required to perform a full calculation when the workbook is opened. This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading the resultant file. For performance consideration for most users' applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property. Indicates whether recalculate the workbook before saving the document, when in manual calculation mode. This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most users' applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property. Indicates whether calculates all formulas every time when a calculation is triggered. This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most users' applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property. Gets or sets the mode for workbook calculation in ms excel. This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most user's application, we do not calculate any formula in the workbook automatically, no matter what mode has been set for this property. If user needs to calculate formulas, please always call methods on different objects according to requirement: , , , ...etc. Specifies the version of the calculation engine used to calculate values in the workbook. This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. In the case of ms excel, if the value of this property is less than the recalculation engine identifier associated with the application that opens the resultant file, the application will recalculate the results of all formulas on this workbook immediately after loading the file. For performance consideration for most users' applications, we do not calculate any formula on the workbook automatically, no matter what value has been set for this property. Indicates whether enable iterative calculation to resolve circular references. The maximum iterations to resolve a circular reference. The maximum change to resolve a circular reference. Whether the precision of calculated result be set as they are displayed while calculating formulas Whether enable calculation chain for formulas. Default is false. When there are lots of formulas in the workbook and user needs to calculate them repeatedly with modifying only a small part of them, it may be helpful for performance to enable the calculation chain. On the other hand, if the chain is enabled, maintaining the model of chain requires extra memory, and it also requires a bit more cpu time for some other operations such as changing cell's value or formulas. After changing this property from false to true, the calculation chain will be analyzed and built at the time of first calculation for the workbook, so the required time for the first calculation may be more than normal calculation without chain. Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false. Generally those spaces and line breaks are jsut for visual purpose, Preserving them or not does not affect the calculated result. For performance consideration, if there is no special requirement, it is better not to preserve them while processing formulas. Represents the globalization settings. Gets or sets the globalization settings for Chart. Gets or sets the globalization settings for pivot table. Gets the name of "Total" label in the PivotTable. You need to override this method when the PivotTable contains two or more PivotFields in the data area. The name of "Total" label NOTE: This member is now obsolete. Instead, please use PivotGlobalizationSettings.GetColumnLabelsOfPivotTable() method. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the name of "Grand Total" label in the PivotTable. The name of "Grand Total" label NOTE: This member is now obsolete. Instead, please use PivotGlobalizationSettings.GetColumnLabelsOfPivotTable() method. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the name of "(Multiple Items)" label in the PivotTable. The name of "(Multiple Items)" label NOTE: This member is now obsolete. Instead, please use PivotGlobalizationSettings.GetColumnLabelsOfPivotTable() method. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the name of "(All)" label in the PivotTable. The name of "(All)" label NOTE: This member is now obsolete. Instead, please use GlobalizationSettings.GetColumnLabelsOfPivotTable() method. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the protection name in the PivotTable. The protection name of PivotTable NOTE: This member is now obsolete. Instead, please use PivotGlobalizationSettings.GetTextOfProtectedName(string) method. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the name of "Column Labels" label in the PivotTable. The name of column labels NOTE: This member is now obsolete. Instead, please use PivotGlobalizationSettings.GetColumnLabelsOfPivotTable() method. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the name of "Row Labels" label in the PivotTable. The name of row labels NOTE: This member is now obsolete. Instead, please use PivotGlobalizationSettings.GetColumnLabelsOfPivotTable() method. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the name of "(blank)" label in the PivotTable. The name of empty data NOTE: This member is now obsolete. Instead, please use PivotGlobalizationSettings.GetColumnLabelsOfPivotTable() method. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the the name of the value area field header in the PivotTable. The name of data field header name NOTE: This member is now obsolete. Instead, please use PivotGlobalizationSettings.GetColumnLabelsOfPivotTable() method. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the name of type in the PivotTable. The type The name of type NOTE: This member is now obsolete. Instead, please use PivotGlobalizationSettings.GetColumnLabelsOfPivotTable() method. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Gets the total name of the function. The function type. The total name of the function. Gets the grand total name of the function. The function type. The grand total name of the function. Gets the default sheet name for adding worksheet automatically. Default is "Sheet". the default sheet name for adding worksheet automatically The automatically added(such as by ) sheet's name will be the specified name plus sequence number. For example, for Germany user maybe wants the sheet name to be "Tabellenblatt2" instead of "Sheet2". Then user may implement this method to return "Tabellenblatt". Gets the type name of table rows that consists of the table header. Default is "Headers", so in formula "#Headers" represents the table header. the type name of table rows Gets the type name of table rows that consists of data region of referenced table. Default is "Data", so in formula "#Data" represents the data region of the table. the type name of table rows Gets the type name of table rows that consists of all rows in referenced table. Default is "All", so in formula "#All" represents all rows in referenced table. the type name of table rows Gets the type name of table rows that consists of the total row of referenced table. Default is "Totals", so in formula "#Totals" represents the total row of referenced table. the type name of table rows Gets the type name of table rows that consists of the current row in referenced table. Default is "This Row", so in formula "#This Row" represents the current row in referenced table. the type name of table rows Gets the display string value for cell's error value error values such as #VALUE!,#NAME? By default returns the error value itself Gets the display string value for cell's boolean value boolean value By default returns "TRUE" for true value and "FALSE" for false value. Gets the locale dependent function name according to given standard function name. Standard(en-US locale) function name. Locale dependent function name. The locale was specified by the Workbook for which this settings is used. Gets the standard function name according to given locale dependent function name. Locale dependent function name. The locale was specified by the Workbook for which this settings is used. Standard(en-US locale) function name. Gets the locale dependent text for built-in Name according to given standard text. Standard(en-US locale) text of built-in Name. Locale dependent text. The locale was specified by the Workbook for which this settings is used. Gets the standard text of built-in Name according to given locale dependent text. Locale dependent text of built-in Name. The locale was specified by the Workbook for which this settings is used. Standard(en-US locale) text. Gets the separator for list, parameters of function, ...etc. Gets the separator for rows in array data in formula. Gets the separator for the items in array's row data in formula. Gets standard English font style name(Regular, Bold, Italic) for Header/Footer according to given locale font style name. Locale font style name for Header/Footer. Standard English font style name(Regular, Bold, Italic) Gets the locale dependent comment title name according to comment title type. Compares two string values according to certain collation rules. the first string the second string whether ignore case when comparing values Integer that indicates the lexical relationship between the two comparands Transforms the string into a comparable object according to certain collation rules. String value needs to be compared with others. whether ignore case when comparing values Object can be used to compare or sort string values Implementation of PivotGlobalizationSettings that supports user to set/change pre-defined texts. Gets the name of Series in the Chart. Sets the name of Series in the Chart. local dependent name Gets the name of Chart Title. Sets the name of Chart Title. local dependent name Gets the name of increase for Legend. Sets the name of increase for Legend. local dependent name Gets the name of Decrease for Legend. Sets the name of Decrease for Legend. local dependent name Gets the name of Total for Legend. Sets the name of Total for Legend. local dependent name Gets the name of Title for Axis. Sets the name of Title for Axis. local dependent name Gets the name of "Other" labels for Chart. Sets the name of "Other" labels for Chart. local dependent name Gets the Name of Axis Unit. Sets the Name of Axis Unit. The unit type for displaying axis labels. local dependent name Implementation of GlobalizationSettings that supports user to set/change pre-defined texts. Gets the total name of specific function. The function type. The total name of the function. Sets the total name of specific function. The function type. The total name of the function. Gets the grand total name of the function. The function type. The grand total name of the function. Sets the grand total name of specific function. The function type. The grand total name of the function. Gets the type name of table rows that consists of the table header. Default is "Headers", so in formula "#Headers" represents the table header. the type name of table rows Sets the type name of table rows that consists of the table header. the type name of table rows Gets the type name of table rows that consists of data region of referenced table. Default is "Data", so in formula "#Data" represents the data region of the table. the type name of table rows Sets the type name of table rows that consists of data region of referenced table. the type name of table rows Gets the type name of table rows that consists of all rows in referenced table. the type name of table rows Sets the type name of table rows that consists of all rows in referenced table. the type name of table rows Gets the type name of table rows that consists of the total row of referenced table. the type name of table rows Sets the type name of table rows that consists of the total row of referenced table. the type name of table rows Gets the type name of table rows that consists of the current row in referenced table. the type name of table rows Sets the type name of table rows that consists of the current row in referenced table. the type name of table rows Gets the display string value for cell's error value error values such as #VALUE!,#NAME? By default returns the error value itself Gets the display string value for cell's boolean value boolean value By default returns "TRUE" for true value and "FALSE" for false value. Sets the display string value for cell's boolean value boolean value string value of the boolean value Gets the locale dependent function name according to given standard function name. Standard(en-US locale) function name. Locale dependent function name. The locale was specified by the Workbook for which this settings is used. Sets the locale dependent function name corresponding to given standard function name. Standard(en-US locale) function name. Locale dependent function name Whether map the local function name to standard function name automatically. If true, the local name will be mapped to standard name automatically so user does not need to call again for the same standard and local names pair Gets the standard function name according to given locale dependent function name. Locale dependent function name. The locale was specified by the Workbook for which this settings is used. Standard(en-US locale) function name. Sets the locale dependent function name according to given standard function name. Locale dependent function name Standard(en-US locale) function name. Whether map the standard function name to local function name automatically. If true, the standar name will be mapped to local name automatically so user does not need to call again for the same standard and local names pair Gets the locale dependent text for built-in Name according to given standard text. Standard(en-US locale) text of built-in Name. Locale dependent text. The locale was specified by the Workbook for which this settings is used. Sets the locale dependent text for the built-in name with given standard name text. Standard(en-US locale) name text of built-in name. Locale dependent name text Whether map the local name text to standard name text automatically. If true, the local name text will be mapped to standard name text automatically so user does not need to call again for the same standard and local names pair Gets the standard text of built-in Name according to given locale dependent text. Locale dependent text of built-in Name. The locale was specified by the Workbook for which this settings is used. Standard(en-US locale) text. Sets the locale dependent function name according to given standard function name. Locale dependent function name Standard(en-US locale) function name. Whether map the standard name text to local name text automatically. If true, the standar name text will be mapped to local name text automatically so user does not need to call again for the same standard and local names pair Gets the separator for list, parameters of function, ...etc. Sets the separator for list, parameters of function, ...etc. the specified separator Gets the separator for rows in array data in formula. Sets the separator for rows in array data in formula. the specified separator Gets the separator for the items in array's row data in formula. Sets the separator for the items in array's row data in formula. the specified separator Gets standard English font style name(Regular, Bold, Italic) for Header/Footer according to given locale font style name. Locale font style name for Header/Footer. Standard English font style name(Regular, Bold, Italic) Sets the locale dependent function name according to given standard function name. Locale font style name for Header/Footer. Standard(en-US locale) function name. Gets the locale dependent comment title name according to comment title type. type of comment title locale dependent comment title name Gets the locale dependent comment title name according to comment title type. type of comment title locale dependent comment title name Implementation of PivotGlobalizationSettings that supports user to set/change pre-defined texts. Gets the text of "Total" label in the PivotTable. You need to override this method when the PivotTable contains two or more PivotFields in the data area. The text of "Total" label Sets the text of "Total" label in the PivotTable. custom text Gets the text of "Grand Total" label in the PivotTable. The text of "Grand Total" label Sets the text of "Grand Total" label in the PivotTable. custom text Gets the text of "(Multiple Items)" label in the PivotTable. The text of "(Multiple Items)" label Sets the text of "(Multiple Items)" label in the PivotTable. custom text Gets the text of "(All)" label in the PivotTable. The text of "(All)" label Sets the text of "(All)" label in the PivotTable. custom text Gets the text for specified protected name. The protected name in PivotTable. The local prorected names of PivotTable. In Ms Excel, some names are not allowed to be used as the name of PivotFields in PivotTable. They are different in different region, user may specify them explicitly according to the used region. Sets the text for specific protected name. The protected name in PivotTable. The local prorected names of PivotTable. Gets the text of "Column Labels" label in the PivotTable. The text of column labels Gets the text of "Column Labels" label in the PivotTable. The text of column labels Gets the text of "Row Labels" label in the PivotTable. The text of row labels Sets the text of "Row Labels" label in the PivotTable. The text of row labels Gets the text of "(blank)" label in the PivotTable. The text of empty data Sets the text of "(blank)" label in the PivotTable. The text of empty data Gets the the text of the value area field header in the PivotTable. The text of data field header name Sets the the text of the value area field header in the PivotTable. The text of data field header name Gets the text of type in the PivotTable. The The text of given type Sets the text of type in the PivotTable. The The text of given type Represents all settings of the workbook. [C#] Workbook workbook = new Workbook(); WorkbookSettings settings = workbook.Settings; //do your business [Visual Basic] Dim workbook as Workbook = new Workbook() Dim settings as WorkbookSettings = workbook.Settings 'do your business Releases resources. Gets the default theme font name. The scheme type of the font. Gets and sets the stream provider for external resource. NOTE: This member is now obsolete. Instead, please use ResourceProvider property. This property will be removed 12 months later since June 2022. Aspose apologizes for any inconvenience you may have experienced. Gets and sets the stream provider for external resource, such as loading image data for picture of type "LinkToFile". Gets and sets the author of the file. It''s not set, check first, then check the user of Environment. Indicates whether checking custom number format when setting Style.Custom. Enable macros; Now it only works when copying a worksheet to other worksheet in a workbook. Gets or sets a value which represents if the workbook uses the 1904 date system. Gets the protection type of the workbook. Indicates whether and how to show objects in the workbook. Width of worksheet tab bar (in 1/1000 of window width). Get or sets a value whether the Workbook tabs are displayed. The default value is true. The following code hides the Sheet Tabs and Tab Scrolling Buttons for the spreadsheet. // Hide the spreadsheet tabs. workbook.Settings.ShowTabs = false; [Visual Basic] ' Hide the spreadsheet tabs. workbook.Settings.ShowTabs = False Gets or sets the first visible worksheet tab. Gets or sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar. The default value is true. The following code makes the horizontal scroll bar invisible for the spreadsheet. [C#] // Hide the horizontal scroll bar of the Excel file. settings.IsHScrollBarVisible = false; [Visual Basic] ' Hide the horizontal scroll bar of the Excel file. settings.IsHScrollBarVisible = False Gets or sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar. The default value is true. The following code makes the vertical scroll bar invisible for the spreadsheet. [C#] // Hide the vertical scroll bar of the Excel file. settings.IsVScrollBarVisible = false; [Visual Basic] ' Hide the vertical scroll bar of the Excel file. settings.IsVScrollBarVisible = False Gets or sets a value that indicates whether the Workbook is shared. The default value is false. Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file. Gets or sets the regional settings for workbook. 1. Regional settings used by Aspose.Cells component for a workbook loaded from template file: i). For an XLS file, there are fields defined for regional settings and MS Excel does save regional settings data into the file when saving the XLS file. So, we use the saved region in the template file for the workbook. If you do not want to use the region saved in the XLS file, please reset it to the expected one (such as, CountryCode.Default) after loading the template file. And, we save the user specified value (by this method) into the file too when saving an XLS file. ii). For other file formats, such as, XLSX, XLSB...etc., there is no field defined for regional settings in the file format specification. So, we use the regional settings of application's environment for the workbook. And, the user specified value (by this method) cannot be kept for the generated files with those file formats. 2. For the view effect in MS Excel: The applied regional settings here can take effect only at runtime with Aspose.Cells component and not when viewing the generated file with MS Excel. Even for the generated XLS file in which the specified regional settings data has been saved, when viewing/editing it with MS Excel, the used region to perform formatting by MS Excel is always the default regional settings of the environment where MS Excel is running, not the one saved in the file. It is MS Excel's behavior and cannot be changed by code. Gets or sets the system culture info. Returns null if culture info is not set and is not set. Gets and sets the globalization settings. Gets or sets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region. Gets or sets the character that separates groups of digits to the left of the decimal in numeric values. Default is the group separator of current Region. Represents Workbook file encryption password. Provides access to the workbook write protection options. Gets a value that indicates whether a password is required to open this workbook. Gets a value that indicates whether the structure or window of the Workbook is protected. Indicates whether encrypting the workbook with default password if Structure and Windows of the workbook are locked. The default value is false now. It's same as MS Excel 2013. Represents whether the generated spreadsheet will be opened Minimized. Indicates whether this workbook is hidden. Specifies a boolean value that indicates the application automatically compressed pictures in the workbook. True if personal information can be removed from the specified workbook. Gets and sets whether hide the field list for the PivotTable. Gets and sets how updates external links when the workbook is opened. Set the type of print orientation for the whole workbook. The page orientation type Gets the max row index, zero-based. Returns 65535 if the file format is Excel97-2003; Gets the max column index, zero-based. Returns 255 if the file format is Excel97-2003; Gets the settings for default values of style-related properties for this workbook. The distance from the left edge of the client area to the left edge of the window, in unit of point. The distance from the left edge of the client area to the left edge of the window. In unit of inch. The distance from the left edge of the client area to the left edge of the window. In unit of centimeter. The distance from the top edge of the client area to the top edge of the window, in unit of point. The distance from the top edge of the client area to the top edge of the window, in unit of inch. The distance from the top edge of the client area to the top edge of the window, in unit of centimeter. The width of the window, in unit of point. The width of the window, in unit of inch. The width of the window, in unit of centimeter. The height of the window, in unit of point. The height of the window, in unit of inch. The height of the window, in unit of centimeter. Indicates whether update adjacent cells' border. The default value is false. For example: the bottom border of the cell A1 is update, the top border of the cell A2 should be changed too. Gets and sets the number of significant digits. The default value is . Only could be 15 or 17 now. Indicates whether check compatibility with earlier versions when saving workbook. The default value is true. Only for Excel97-2003 xls or xlt files. Whether check restriction of excel file when user modify cells related objects. For example, excel does not allow inputting string value longer than 32K. When you input a value longer than 32K such as by Cell.PutValue(string), if this property is true, you will get an Exception. If this property is false, we will accept your input string value as the cell's value so that later you can output the complete string value for other file formats such as CSV. However, if you have set such kind of value that is invalid for excel file format, you should not save the workbook as excel file format later. Otherwise there may be unexpected error for the generated excel file. Indicates whether the file is marked for auto-recovery. indicates whether the application last saved the workbook file after a crash. indicates whether the application last opened the workbook for data recovery. Indicates whether the application last opened the workbook in safe or repair mode. Specifies the incremental public release of the application. Gets or sets the memory usage options. The new option will be taken as the default option for newly created worksheets but does not take effect for existing worksheets. Gets and sets the default print paper size. If there is no setting about paper size,MS Excel will use default printer's setting. Gets or sets warning callback. Gets and sets the max row number of shared formula. If the number is too large, the autofilter works very slow in MS Excel 2013. Specifies the OOXML version for the output document. The default value is Ecma376_2006. Only for .xlsx files. Indicates whether setting property when entering the string value(which starts with single quote mark ) to the cell Gets the settings for formula-related features. Indicates whether datapoint properties and datalabels in all charts in this workbook follow their reference. Indicates whether discarding editting image data. Gets and sets default resolution of image. Represents a range of characters within the cell text. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Excel object workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[0]; //Accessing the "A1" cell from the worksheet Aspose.Cells.Cell cell = worksheet.Cells["A1"]; //Adding some value to the "A1" cell cell.PutValue("Visit Aspose!"); //getting charactor FontSetting charactor = cell.Characters(6, 7); //Setting the font of selected characters to bold charactor.Font.IsBold = true; //Setting the font color of selected characters to blue charactor.Font.Color = Color.Blue; //Saving the Excel file workbook.Save("book1.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Excel object workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(0) 'Accessing the "A1" cell from the worksheet Dim cell As Aspose.Cells.Cell = worksheet.Cells("A1") 'Adding some value to the "A1" cell cell.PutValue("Visit Aspose!") 'getting charactor Dim charactor As FontSetting = cell.Characters(6, 7) 'Setting the font of selected characters to bold charactor.Font.IsBold = True 'Setting the font color of selected characters to blue charactor.Font.Color = Color.Blue 'Saving the Excel file workbook.Save("book1.xls") Gets the type of text node. Gets the start index of the characters. Gets the length of the characters. Returns the font of this object. Sets the preset WordArt style. The preset WordArt style. Only for the text of shape/chart. Returns the text options. Specifies the worksheet type. Visual Basic module Chart BIFF4 Macro sheet International Macro sheet Dialog worksheet Represent the shift options when deleting a range of cells. Shift cells down. Shift cells left. Do not shift cells. Shift cells right. Shift cells up. Represents callback interface of processing smartmarker. Callback for processing a smart marker. The sheet index. The row index. The column index. The table name of smartmarker. The table name of smartmarker. Encapsulates the object that represents a designer spreadsheet. [C#] //Create WorkbookDesigner object. WorkbookDesigner wd = new WorkbookDesigner(); //Open the template file (which contains smart markers). wd.Workbook = new Workbook("SmartMarker_Designer.xls"); //Initialize your data from data source //DataSet ds = new DataSet(); //... //Set the datatable as the data source. //wd.SetDataSource(dt); //Process the smart markers to fill the data into the worksheets. wd.Process(true); //Save the excel file. wd.Workbook.Save("outSmartMarker_Designer.xls"); Gets and sets the object. Indicates whether repeating formulas with subtotal row. Initializes a new instance of the class. Initializes a new instance of the class. The template workbook file. Clears all data sources. Sets data source of a object. The name of the data source. data table. Sets data source of a DataSet object. DataSet object [C#] //Create a connection object, specify the provider info and set the data source. OleDbConnection con = new OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=Northwind.mdb"); //Open the connection object. con.Open(); //Create a command object and specify the SQL query. OleDbCommand cmd = new OleDbCommand("Select * from [Order Details]", con); //Create a data adapter object. OleDbDataAdapter da = new OleDbDataAdapter(); //Specify the command. da.SelectCommand = cmd; //Create a dataset object. DataSet ds = new DataSet(); //Fill the dataset with the table records. da.Fill(ds, "Order Details"); //Create a datatable with respect to dataset table. DataTable dt = ds.Tables["Order Details"]; //Create WorkbookDesigner object. WorkbookDesigner wd = new WorkbookDesigner(); //Open the template file (which contains smart markers). wd.Workbook = new Workbook("SmartMarker_Designer.xls"); //Set the datatable as the data source. wd.SetDataSource(dt); //Process the smart markers to fill the data into the worksheets. wd.Process(true); //Save the excel file. wd.Workbook.Save("outSmartMarker_Designer.xls"); [Visual Basic] 'Create a connection object, specify the provider info and set the data source. Dim con As OleDbConnection = New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=Northwind.mdb") 'Open the connection object. con.Open() 'Create a command object and specify the SQL query. Dim cmd As OleDbCommand = New OleDbCommand("Select * from [Order Details]", con) 'Create a data adapter object. Dim da As OleDbDataAdapter = New OleDbDataAdapter() 'Specify the command. da.SelectCommand = cmd 'Create a dataset object. Dim ds As DataSet = New DataSet() 'Fill the dataset with the table records. da.Fill(ds, "Order Details") 'Create a datatable with respect to dataset table. Dim dt As DataTable = ds.Tables("Order Details") 'Create WorkbookDesigner object. Dim wd As WorkbookDesigner = New WorkbookDesigner() 'Open the template file (which contains smart markers). Dim workbook As Workbook = New Workbook("SmartMarker_Designer.xls") wd.Workbook = workbook 'Set the datatable as the data source. wd.SetDataSource(dt) 'Process the smart markers to fill the data into the worksheets. wd.Process(True) 'Save the excel file. wd.Workbook.Save("outSmartMarker_Designer.xls") Sets data source of a DataTable object. DataTable object Sets data source of a DataView object and binds it to a data source name. Data source name. DataView object. Sets data source of a DataView object. DataView object Sets data source of a IDataReader object. The data source map name. IDataReader object The number of the data rows. If the smart marker does not contains "noadd", we have to insert rows by the row count for performance issue and dynamic repeated formulas. -1 means the param is useless. Sets data binding to a variable. Variable name created using smart marker. Source data. If TRUE, Null will be inserted if the value is ""; Indicates if references in other worksheets will be updated. Indicates whether formulas should be calculated. Gets and sets callback interface of processing smartmarker. Indicates whether processing the smart marker line by line. The default value is true. If False, the template file must contain a range which is named as "_CellsSmartMarkers". Processes the smart markers and populates the data source values. The range to be processed True if the unrecognized smart marker is preserved. Processes the smart markers and populates the data source values. Processes the smart markers and populates the data source values. True if the unrecognized smart marker is preserved. Processes the smart markers and populates the data source values. Worksheet index. True if the unrecognized smart marker is preserved. This method works on worksheet level. Returns a collection of smart markers in a spreadsheet. A collection of smart markers A string array is created on every call. The array is sorted and duplicated values are removed. Summary description for DataSorter. [C#] //Instantiate a new Workbook object. Workbook workbook = new Workbook("Book1.xls"); //Get the workbook datasorter object. DataSorter sorter = workbook.DataSorter; //Set the first order for datasorter object. sorter.Order1 = Aspose.Cells.SortOrder.Descending; //Define the first key. sorter.Key1 = 0; //Set the second order for datasorter object. sorter.Order2 = Aspose.Cells.SortOrder.Ascending; //Define the second key. sorter.Key2 = 1; //Create a cells area (range). CellArea ca = new CellArea(); //Specify the start row index. ca.StartRow = 0; //Specify the start column index. ca.StartColumn = 0; //Specify the last row index. ca.EndRow = 13; //Specify the last column index. ca.EndColumn = 1; //Sort data in the specified data range (A1:B14) sorter.Sort(workbook.Worksheets[0].Cells, ca); //Save the excel file. workbook.Save("outBook.xls"); [Visual Basic] 'Instantiate a new Workbook object. Dim workbook As Workbook = New Workbook("Book1.xls") 'Get the workbook datasorter object. Dim sorter As DataSorter = workbook.DataSorter 'Set the first order for datasorter object sorter.Order1 = Aspose.Cells.SortOrder.Descending 'Define the first key. sorter.Key1 = 0 'Set the second order for datasorter object. sorter.Order2 = Aspose.Cells.SortOrder.Ascending 'Define the second key. sorter.Key2 = 1 'Create a cells area (range). Dim ca As CellArea = New CellArea 'Specify the start row index. ca.StartRow = 0 'Specify the start column index. ca.StartColumn = 0 'Specify the last row index. ca.EndRow = 13 'Specify the last column index. ca.EndColumn = 1 'Sort the data in the specified data range (A1:B14) sorter.Sort(workbook.Worksheets(0).Cells, ca) 'Save the excel file. workbook.Save("outBook.xls") Gets the key list of data sorter. Clear all settings. Represents whether the range has headers. Adds sorted column index and sort order. The sorted column index(absolute position, column A is 0, B is 1, ...) The sort order Adds sorted column index and sort order with custom sort list. The sorted column index(absolute position, column A is 0, B is 1, ...) The sort order. The custom sort list. Adds color sort key. The sorted column index(absolute position, column A is 0, B is 1, ...) The sorted color value type. The sort order. The custom sort color. Adds sorted column index and sort order with custom sort list. The sorted column index(absolute position, column A is 0, B is 1, ...) The sorted value type. The sort order. The custom sort list. If type is SortOnType.CellColor or SortOnType.FontColor, the customList is Color. Adds sorted column index and sort order with custom sort list. The sorted column index(absolute position, column A is 0, B is 1, ...) The sort order. The custom sort list. Represents first sorted column index(absolute position, column A is 0, B is 1, ...). Represents sort order of the first key. Represents second sorted column index(absolute position, column A is 0, B is 1, ...). Represents sort order of the second key. Represents third sorted column index(absolute position, column A is 0, B is 1, ...). Represents sort order of the third key. True means that sorting orientation is from left to right. False means that sorting orientation is from top to bottom. The default value is false. Gets and sets whether case sensitive when comparing string. Indicates whether sorting anything that looks like a number. Sorts the data of the area. The cells contains the data area. The start row of the area. The start column of the area. The end row of the area. The end column of the area. the original indices(absolute position, for example, column A is 0, B is 1, ...) of the sorted rows/columns. If no rows/columns needs to be moved by this sorting operation, null will be returned. Sort the data of the area. The cells contains the data area. The area needed to sort the original indices(absolute position, for example, column A is 0, B is 1, ...) of the sorted rows/columns. If no rows/columns needs to be moved by this sorting operation, null will be returned. Sort the data in the range. the original indices(absolute position, for example, column A is 0, B is 1, ...) of the sorted rows/columns. If no rows/columns needs to be moved by this sorting operation, null will be returned. Represents the key of the data sorter. Indicates the order of sorting. Gets the sorted column index(absolute position, column A is 0, B is 1, ...). Represents the type of sorting. Represents the icon set type. Only takes effect when is . Represents the id of the icon set type. Only takes effect when is . Gets the sorted color. Only takes effect when is or . Represents the key list of data sorter. Gets and sets by index. The index. Sorted value type. Sorts by cells' value. Sorts by cells' color. Sorts by cells' font color. Sorts by conditional icon. Represents sort order for the data range. Sorts data in ascending order Sorts data in descending order Keeps original data order without sorting. Only applies to some special scenarios such as PivotTable. Enumerates cell background pattern types. Represents diagonal crosshatch pattern. Represents diagonal stripe pattern. Represents 6.25% gray pattern Represents 12.5% gray pattern Represents 25% gray pattern. Represents 50% gray pattern. Represents 75% gray pattern. Represents horizontal stripe pattern. Represents no background. Represents reverse diagonal stripe pattern. Represents solid pattern. Represents thick diagonal crosshatch pattern. Represents thin diagonal crosshatch pattern. Represents thin diagonal stripe pattern. Represents thin horizontal crosshatch pattern. Represents thin horizontal stripe pattern. Represents thin reverse diagonal stripe pattern. Represents thin vertical stripe pattern. Represents vertical stripe pattern. Encapsulates the object that represents the cell border. [C#] Workbook workbook = new Workbook(); WorksheetCollection sheets = workbook.Worksheets; Cell cell = sheets[0].Cells["A1"]; Style style = cell.GetStyle(); //Set top border style and color Border border = style.Borders[BorderType.TopBorder]; border.LineStyle = CellBorderType.Medium; border.Color = Color.Red; cell.SetStyle(style); [Visual Basic] Dim workbook as Workbook = New Workbook() Dim sheets as WorksheetCollection = workbook.Worksheets Cell cell = sheets(0).Cells("A1"); Dim style as Style = cell.GetStyle() 'Set top border style and color Dim border as Border = style.Borders(BorderType.TopBorder) border.LineStyle = CellBorderType.Medium border.Color = Color.Red cell.SetStyle(style); Gets and sets the theme color of the border. Gets or sets the of the border. Gets and sets the color with a 32-bit ARGB value. Gets or sets the cell border type. Encapsulates a collection of objects. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Excel object workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[0]; //Accessing the "A1" cell from the worksheet Cell cell = worksheet.Cells["A1"]; //Adding some value to the "A1" cell cell.PutValue("Visit Aspose!"); Style style = cell.GetStyle(); //Setting the line style of the top border style.Borders[BorderType.TopBorder].LineStyle = CellBorderType.Thick; //Setting the color of the top border style.Borders[BorderType.TopBorder].Color = Color.Black; //Setting the line style of the bottom border style.Borders[BorderType.BottomBorder].LineStyle = CellBorderType.Thick; //Setting the color of the bottom border style.Borders[BorderType.BottomBorder].Color = Color.Black; //Setting the line style of the left border style.Borders[BorderType.LeftBorder].LineStyle = CellBorderType.Thick; //Setting the color of the left border style.Borders[BorderType.LeftBorder].Color = Color.Black; //Setting the line style of the right border style.Borders[BorderType.RightBorder].LineStyle = CellBorderType.Thick; //Setting the color of the right border style.Borders[BorderType.RightBorder].Color = Color.Black; cell.SetStyle(style); //Saving the Excel file workbook.Save("book1.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Workbook object workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(0) 'Accessing the "A1" cell from the worksheet Dim cell As Cell = worksheet.Cells("A1") 'Adding some value to the "A1" cell cell.PutValue("Visit Aspose!") Dim style as Style = cell.GetStyle() 'Setting the line style of the top border style.Borders(BorderType.TopBorder).LineStyle = CellBorderType.Thick 'Setting the color of the top border style.Borders(BorderType.TopBorder).Color = Color.Black 'Setting the line style of the bottom border style.Borders(BorderType.BottomBorder).LineStyle = CellBorderType.Thick 'Setting the color of the bottom border style.Borders(BorderType.BottomBorder).Color = Color.Black 'Setting the line style of the left border style.Borders(BorderType.LeftBorder).LineStyle = CellBorderType.Thick 'Setting the color of the left border style.Borders(BorderType.LeftBorder).Color = Color.Black 'Setting the line style of the right border style.Borders(BorderType.RightBorder).LineStyle = CellBorderType.Thick 'Setting the color of the right border style.Borders(BorderType.RightBorder).Color = Color.Black cell.SetStyle(style) 'Saving the Excel file workbook.Save("book1.xls") Gets the element at the specified index. The border to be retrieved. The element at the specified index. Sets the of all borders in the collection. Borders' . Sets the style of all borders of the collection. Borders' style Gets or sets the of Diagonal lines. Gets or sets the style of Diagonal lines. Enumerates the border line and diagonal line types. Represents left border line. Represents right border line exists. Represents top border line. Represents bottom border line. Represents the diagonal line from top left to right bottom. Represents the diagonal line from bottom left to right top. Only for dynamic style, such as conditional formatting. Only for dynamic style, such as conditional formatting. Indicates the four side borders: , , and . It is combination of multiple borders for user's convenience and can only be used for some APIs that accept multiple border types. Special combination of multiple borders for user's convenience for some APIs. Indicates diagonal borders of and . It is combination of multiple borders for user's convenience and can only be used for some APIs that accept multiple border types. Indicates and of dynamic style. It is combination of multiple borders for user's convenience and can only be used for some APIs that accept multiple border types. No border has been specified. It can only be used for some APIs that accept none or multiple border types. Represents all built-in style types. Enumerates a cell's border type. Represents thin dash-dotted line. Represents thin dash-dot-dotted line. Represents dashed line. Represents dotted line. Represents double line. Represents hair line. Represents medium dash-dotted line. Represents medium dash-dot-dotted line. Represents medium dashed line. Represents no line. Represents medium line. Represents slanted medium dash-dotted line. Represents thick line. Represents thin line. Represents all types of color. Gets and set the color which should apply to cell or shape. The expression of the color of the cell and the shape is different. For example: the theme color with same tint value will be not same in the cell and the shape. The color type. Gets the theme color. Only applies for theme color type. Gets and sets the color index in the color palette. Only applies of indexed color. Gets and sets the RGB color. Gets and sets the color from a 32-bit ARGB value. Gets and sets transparency as a value from 0.0 (opaque) through 1.0 (clear). Set the tint of the shape color Represents all color type Automatic color. It's automatic color,but the displayed color depends the setting of the OS System. Not supported. The RGB color. The color index in the color palette. The theme color. Represents the master differential formatting records. Gets the element at the specified index. The specified index. Encapsulates the font object used in a spreadsheet. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[0]; //Accessing the "A1" cell from the worksheet Aspose.Cells.Cell cell = worksheet.Cells["A1"]; //Adding some value to the "A1" cell cell.PutValue("Hello Aspose!"); Aspose.Cells.Font font = cell.GetStyle().Font; //Setting the font name to "Times New Roman" font.Name = "Times New Roman"; //Setting font size to 14 font.Size = 14; //setting font color as Red font.Color = System.Drawing.Color.Red; //Saving the Excel file workbook.Save(@"dest.xls"); [VB.NET] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(0) 'Accessing the "A1" cell from the worksheet Dim cell As Aspose.Cells.Cell = worksheet.Cells("A1") 'Adding some value to the "A1" cell cell.PutValue("Hello Aspose!") Dim font As Aspose.Cells.Font = cell.GetStyle().Font 'Setting the font name to "Times New Roman" font.Name = "Times New Roman" 'Setting font size to 14 font.Size = 14 'setting font color as Red font.Color = System.Drawing.Color.Red 'Saving the Excel file workbook.Save("dest.xls") Represent the character set. Gets or sets a value indicating whether the font is italic. Gets or sets a value indicating whether the font is bold. Gets and sets the text caps type. Gets the strike type of the text. Gets or sets a value indicating whether the font is single strikeout. Gets and sets the script offset,in unit of percentage Gets or sets a value indicating whether the font is super script. Gets or sets a value indicating whether the font is subscript. Gets or sets the font underline type. Gets or sets the name of the . Gets and sets the double size of the font. Gets or sets the size of the font. Gets and sets the theme color. If the font color is not a theme color, NULL will be returned. Gets or sets the of the font. Gets and sets the color with a 32-bit ARGB value. Checks if two fonts are equals. Compared font object. True if equal to the compared font object. Indicates whether the normalization of height that is to be applied to the text run. Gets and sets the scheme type of the font. Returns a string represents the current Cell object. Represents the scheme type of the font. None Major scheme. Minor scheme. The font's name will be automatically changed with the language. Enumerates the font underline types. Represents no underline. Represents single underline. Represents double underline. Represents single accounting underline. Represents double accounting underline. Represents Dashed Underline Represents Thick Dash-Dot-Dot Underline Represents Thick Dash-Dot Underline Represents Thick Dashed Underline Represents Long Dashed Underline Represents Thick Long Dashed Underline Represents Dash-Dot Underline Represents Dash-Dot-Dot Underline Represents Dotted Underline Represents Thick Dotted Underline Represents Thick Underline Represents Wave Underline Represents Double Wave Underline Represents Heavy Wave Underline Represents Underline Non-Space Characters Only Represents category type of cell's number formatting. General Text Number Date or Date and Time Time Fraction Scientific Represents display style of excel document,such as font,color,alignment,border,etc. The Style object contains all style attributes (font, number format, alignment, and so on) as properties. [C#] Workbook workbook = new Workbook(); WorksheetCollection sheets = workbook.Worksheets; Cell cell = sheets[0].Cells["A1"]; Style style = cell.GetStyle(); style.Font.Name = "Times New Roman"; style.Font.Color = Color.Blue; cell.SetStyle(style); Gets and sets the background theme color. If the background color is not a theme color, NULL will be returned. Gets and sets the foreground theme color. If the foreground color is not a theme color, NULL will be returned. Gets or sets the name of the style. Gets or sets the cell background pattern type. Sets the background color. The pattern. The foreground color. The background color. Only works when pattern is not BackgroundType.None and BackgroundType.Solid. Gets the of the style. Initializes a new instance of the class. NOTE: This constructor is now obsolete. Instead, please use CellsFactory.CreateStyle() method. This property will be removed 6 months later since October 2016. Aspose apologizes for any inconvenience you may have experienced. Gets or sets a style's background color. If you want to set a cell's color, please use Style.ForegroundColor property. Only if the cell style pattern is other than none or solid, this property will take effect. Gets and sets the background color with a 32-bit ARGB value. Gets or sets a style's foreground color. It means no color setting if Color.Empty is returned. Gets and sets the foreground color with a 32-bit ARGB value. Copies data from another style object Source Style object This method does not copy the name of the style. If you want to copy the name, please call the following codes after copying style: destStyle.Name = style.Name. Checks whether there are borders have been set for the style. Gets the parent style of this style. Apply the named style to the styles of the cells which use this named style. It works like clicking the "ok" button after you finished modifying the style. Only applies for named style. Indicate whether the number formatting should be applied. Only for named style. Indicate whether the font formatting should be applied. Only for named style. Indicate whether the alignment formatting should be applied. Only for named style. Indicate whether the border formatting should be applied. Only for named style. Indicate whether the fill formatting should be applied. Only for named style. Indicate whether the protection formatting should be applied. Only for named style. Checks whether the specified properties of the style have been modified. Used for style of ConditionalFormattings to check whether the specified properties of this style should be used when applying the ConditionalFormattings on a cell. Style modified flags true if the specified properties have been modified Determines whether two Style instances are equal. The Style object to compare with the current Style object. true if the specified Object is equal to the current Object; otherwise, false. Serves as a hash function for a Style object. A hash code for the current Object. This method is only for internal use. Represents the indent level for the cell or range. Can only be an integer from 0 to 250. If text horizontal alignment type is set to value other than left or right, indent level will be reset to zero. Gets a object. Represents text rotation angle.

0: Not rotated.

255: Top to Bottom.

-90: Downward.

90: Upward.

You can set 255 or value ranged from -90 to 90.
Gets or sets the horizontal alignment type of the text in a cell. Gets or sets the vertical alignment type of the text in a cell. Gets or sets a value indicating whether the text within a cell is wrapped. Gets or sets the display format of numbers and dates. The formatting patterns are different for different regions. For example, the formatting patterns represented by numbers for en_US region: ValueTypeFormat String0GeneralGeneral1Decimal02Decimal0.003Decimal#,##04Decimal#,##0.005Currency$#,##0_);($#,##0)6Currency$#,##0_);[Red]($#,##0)7Currency$#,##0.00_);($#,##0.00)8Currency$#,##0.00_);[Red]($#,##0.00)9Percentage0%10Percentage0.00%11Scientific0.00E+0012Fraction# ?/?13Fraction# ??/??14Datem/d/yyyy15Dated-mmm-yy16Dated-mmm17Datemmm-yy18Timeh:mm AM/PM19Timeh:mm:ss AM/PM20Timeh:mm21Timeh:mm:ss22Timem/d/yyyy h:mm37Accounting#,##0_);(#,##0)38Accounting#,##0_);[Red](#,##0)39Accounting#,##0.00_);(#,##0.00)40Accounting#,##0.00_);[Red](#,##0.00)41Accounting_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)42Currency_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)43Accounting_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)44Currency_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)45Timemm:ss46Time[h]:mm:ss47Timemm:ss.048Scientific##0.0E+049Text@ Sets the borders of the style. The border(s) to be set, can be combination of . The style of the border. The color of the border. Whether current border settings have been changed. Sets the borders of the style. The border(s) to be set, can be combination of . The style of the border. The color of the border. Whether current border settings have been changed. Gets or sets a value indicating whether a cell can be modified or not. Locking cells has no effect unless the worksheet is protected. Sets the Custom number format string of a cell. Custom number format string, should be InvariantCulture pattern. If given Custom number format string matches one of the built-in number formats corresponding to current regional settings, whether set the number format as built-in instead of Custom. Represents the custom number format string of this style object. If the custom number format is not set(For example, the number format is builtin), "" will be returned. The returned custom string is culture-independent. Gets and sets the culture-dependent pattern string for number format. If no number format has been set for this object, null will be returned. If number format is builtin, the pattern string corresponding to the builtin number will be returned. For builtin number format, both the pattern content(such as, one builtin date format is "m/d/y" for some locales, but for some other locales it becomes "d/m/y") and the format specifier(such as, some locales is using character other than 'y' to represent the year part for date formatting) are culture-dependent; For user specified custom format, only format specifiers are changed according to the culture, other parts of the formatting pattern will not be modified. Gets the culture-independent pattern string for number format. If no number format has been set for this object, null will be returned. If number format is builtin, the pattern string corresponding to the builtin number will be returned. For builtin number formats, the returned pattern content is still culture-dependent, such as, for some locales it returns "m/d/y" and for some other locales it returns "d/m/y". The difference from is(that is also what culture-independent means): the format specifiers and separators are kept as standard, such as '/' will always be used as datetime separator and "y" will always be used as the "year" part no matter what other special character is used for the specific locale. Represents if the formula will be hidden when the worksheet is protected. Represents if text automatically shrinks to fit in the available column width. Represents text reading order. Indicates if the cells justified or distributed alignment should be used on the last line of text. This is typical for East Asian alignments but not typical in other contexts. Indicates whether the cell's value starts with single quote mark. Indicates whether the cell shading is a gradient pattern. Sets the specified fill to a two-color gradient. One gradient color. Two gradient color. Gradient shading style. The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2. Get the two-color gradient setting. One gradient color. Two gradient color. Gradient shading style. The gradient variant. NOTE: This method is now obsolete. Instead, please use Style.GetTwoColorGradientSetting() method. This property will be removed 12 months later since December 2022. Aspose apologizes for any inconvenience you may have experienced. Get the two-color gradient setting. Indicates whether the number format is a percent format. Indicates whether the number format is a date format. Convert to JSON struct data. Represents flags which indicates applied formatting properties. Constructs an object with all flags as false. All properties will be applied. All borders settings will be applied. Left border settings will be applied. Right border settings will be applied. Top border settings will be applied. Bottom border settings will be applied. Diagonal down border settings will be applied. Diagonal up border settings will be applied. Font settings will be applied. Font size setting will be applied. Font name setting will be applied. Font color setting will be applied. Font bold setting will be applied. Font italic setting will be applied. Font underline setting will be applied. Font strikeout setting will be applied. Font script setting will be applied. Number format setting will be applied. Alignment setting will be applied. Horizontal alignment setting will be applied. Vertical alignment setting will be applied. Indent level setting will be applied. Rotation setting will be applied. Wrap text setting will be applied. Shrink to fit setting will be applied. Text direction setting will be applied. Cell shading setting will be applied. Locked setting will be applied. Hide formula setting will be applied. Hide formula setting will be applied. The style modified flags. Combinations of multiple properties are defined for user's convenience. When checking whether they are modified for one style, the returned value denotes whether one or more properties in the combination have been modified. Indicates whether left border has been modified for the style. Indicates whether right border has been modified for the style. Indicates whether top border has been modified for the style. Indicates whether bottom border has been modified for the style. Indicates whether diagonal-down border has been modified for the style. Indicates whether diagonal-up border has been modified for the style. Indicates whether horizontal border has been modified for the style. Only for dynamic style, such as conditional formatting. Indicates whether vertical border has been modified for the style. Only for dynamic style, such as conditional formatting. Indicates the four side borders: , , and . Indicates diagonal borders: and . Indicates borders of dynamic style: and . Indicates whether one or more borders(, , , , , , ) have been modified for the style. Indicates whether numberformat has been modified. Indicates whether horizontal alignment has been modified. Indicates whether vertical alignment has been modified. Indicates whether indent property has been modified. Indicates whether rotation property has been modified. Indicates whether wrap text property has been modified. Indicates whether shrink to fit property has been modified. Indicates whether text direction property has been modified. Indicates whether relative indent property has been modified for the style. Only for dynamic style, such as conditional formatting. Indicates whether one or more alignment-related properties(, , , , , , , , ) have been modified. Indicates whether pattern of the shading has been modified. Indicates whether foreground color has been modified. Indicates whether background color has been modified. Indicates whether one or more shading-related properties(, , ) have been modified. Indicates whether locked property has been modified. Indicates whether hide formula has been modified. Indicates whether one or more protection-related properties(, ) have been modified. Indicates whether font size has been modified. Indicates whether font name has been modified. Indicates whether font color has been modified. Indicates whether font weight has been modified. Indicates whether italic property of font has been modified. Indicates whether underline property of font has been modified. Indicates whether strike property font has been modified. Indicates whether subscript or superscript property of font has been modified. Indicates whether font family has been modified. Indicates whether charset of the font has been modified. unused. unused. unused. unused. unused. unused. unused. unused. Indicates whether one or more properties have been modified for the font of the style. All properties that can be modified for the style. No property has been specified. Enumerates text alignment types. Represents general text alignment. Represents bottom text alignment. Represents center text alignment. Represents center across text alignment. Represents distributed text alignment. Represents fill text alignment. Represents justify text alignment. Represents left text alignment. Represents right text alignment. Represents top text alignment. Aligns the text with an adjusted kashida length for Arabic text. Distributes Thai text specially, because each character is treated as a word. This type specifies the cap types of the text. None caps Apply all caps on the text. Apply small caps to the text. Represents the direction of the text flow for this paragraph. Enumerates text orientation types. Rotates text with 90 degrees clockwise. Rotates text with 90 degrees counterclockwise. Represents the default value. Displays text from top to bottom of the cell. Stacked text. This type specifies the strike type. A single strikethrough applied on the text. A double strikethrough applied on the text. Only works for the text of the shapes or charts. No strike is applied to the text. Represents a theme color. [C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); Cells cells = workbook.Worksheets[0].Cells; cells["A1"].PutValue("Hello World"); Style style = cells["A1"].GetStyle(); //Set ThemeColorType.Text2 color type with 40% lighten as the font color. style.Font.ThemeColor = new ThemeColor(ThemeColorType.Text2, 0.4); style.Pattern = BackgroundType.Solid; //Set ThemeColorType.Background2 color type with 75% darken as the foreground color style.ForegroundThemeColor = new ThemeColor(ThemeColorType.Background2, -0.75); cells["A1"].SetStyle(style); //Saving the Excel file workbook.Save("book1.xlsx"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() Dim cells As Cells = workbook.Worksheets(0).Cells cells("A1").PutValue("Hello World") 'Get the cell style Dim style As Style = cells("A1").GetStyle() 'Set ThemeColorType.Text2 color type with 40% lighten as the font color. Style.Font.ThemeColor = New ThemeColor(ThemeColorType.Text2, 0.4) Style.Pattern = BackgroundType.Solid 'Set ThemeColorType.Background2 color type with 75% darken as the foreground color style.ForegroundThemeColor = New ThemeColor(ThemeColorType.Background2, -0.75) 'Set the cell style cells("A1").SetStyle(style) 'Saving the Excel file Workbook.Save("book1.xlsx") The theme type. The tint value. Gets and sets the theme type. Gets and sets the tint value. The tint value is stored as a double from -1.0 .. 1.0, where -1.0 means 100% darken and 1.0 means 100% lighten. Also, 0.0 means no change. Enumerates the theme color types. Inner used. A color used in theme definitions which means to use the color of the style. Represents two color gradient. Gets and sets the first gradient color. Gets and sets the second gradient color. Gets and sets gradient shading style. Gets and sets the gradient variant. Simple implementation of by checking and comparing current system time with user specified limit. This implementation is just a simple solution for simple scenarios. It needs to frequently retrieve and check the system time so itself may have a negative impact on performance to some extent. The following example shows how to monitor the load and save procedure with specified time limit: [C#] SystemTimeInterruptMonitor monitor = new SystemTimeInterruptMonitor(false); LoadOptions lopts = new LoadOptions(); lopts.InterruptMonitor = monitor; monitor.StartMonitor(1000); //time limit is 1 second Workbook wb = new Workbook("Large.xlsx", lopts); //if the time cost of loading the template file exceeds one second, interruption will be required and exception will be thrown here //otherwise starts to monitor the save procedure monitor.StartMonitor(1500); //time limit is 1.5 seconds wb.Save("result.xlsx"); Constructs one interruption monitor. Starts the monitor with the specified time limit. The start time to calculate time cost is just when this method is called, so the procedure which needs to be monitored should be started just after this call. time limit(ms) to require the interruption. This implementation just checks whether the time cost(from the time when starting this monitor to now) is greater than user specified limit. See . This property is specified by user when constructing this monitor instance. Simple implementation of by starting another thread to require the interruption after sleeping user specified limit. One monitor instance can be used repeatedly, as long as you monitor each process in sequence. It should not be used to monitor multiple procedures concurrently in multi-threads. The following example shows how to monitor the load and save procedure with specified time limit: [C#] ThreadInterruptMonitor monitor = new ThreadInterruptMonitor(false); LoadOptions lopts = new LoadOptions(); lopts.InterruptMonitor = monitor; monitor.StartMonitor(1000); //time limit is 1 second Workbook wb = new Workbook("Large.xlsx", lopts); //if the time cost of loading the template file exceeds one second, interruption will be required and exception will be thrown here //otherwise finishes the monitor thread and starts to monitor the save procedure monitor.FinishMonitor(); monitor.StartMonitor(1500); //time limit is 1.5 seconds wb.Save("result.xlsx"); monitor.FinishMonitor(); Constructs one interruption monitor. Starts the monitor with the specified time limit. The start time to calculate time cost is just when this method is called, so the procedure which needs to be monitored should be started just after this call. time limit(ms) to require the interruption. Finishes the monitor for one procedure. Calling this method after the monitored procedure can release the monitor thread earlier, especially when there is no interruption for it(the time cost of that procedure is less than the specified time limit). This implementation just checks whether the time cost(from the time when starting this monitor to now) is greater than user specified limit. See . This property is specified by user when constructing this monitor instance. Represents union range. Gets the index of the first row of the range. Only effects when it only contains one range. Gets the index of the first column of the range. Only effects when it only contains one range. Gets the count of rows in the range. Only effects when it only contains one range. Gets the count of rows in the range. Only effects when it only contains one range. Combines a range of cells into a single cell. Reference the merged cell via the address of the upper-left cell in the range. Unmerges merged cells of this range. Puts a value into the range, if appropriate the value will be converted to other data type and cell's number format will be reset. Input value True: converted to other data type if appropriate. True: set the number format to cell's style when converting to other data type Gets and sets the values of the range. Gets or sets the name of the range. Named range is supported. For example,

range.Name = "Sheet1!MyRange";

Gets the range's refers to. Indicates whether this has range. Gets all hyperlink in the range. Sets the style of the range. The Style object. Applies formats for a whole range. The style object which will be applied. Flags which indicates applied formatting properties. Each cell in this range will contains a object. So this is a memory-consuming method. Please use it carefully. Copying the range with paste special options. The source range. The paste special options. Gets the enumerator for cells in this Range. The cells enumerator When traversing elements by the returned Enumerator, the cells collection should not be modified(such as operations that will cause new Cell/Row be instantiated or existing Cell/Row be deleted). Otherwise the enumerator may not be able to traverse all cells correctly(some elements may be traversed repeatedly or skipped). Gets all cell count in the range. Gets the count of the ranges. Gets all union ranges. Sets out line borders around a range of cells. Border styles. Border colors. Both the length of borderStyles and borderStyles must be 4. The order of borderStyles and borderStyles must be top,bottom,left,right Sets the outline borders around a range of cells with same border style and color. Border style. Border color. Intersects another range. The range. If the two union ranges are not intersected, returns null. Intersects another range. The range. If the two union ranges are not intersected, returns null. Intersects another range. The range. If the two union ranges are not intersected, returns null. Union another range. The range. Union another range. The range. Union the ranges. The ranges. Represents how to update links to other workbooks when the workbook is opened. Prompt user to update. Do not update, and do not prompt user. Always update. Represents data validation.settings. [C#] Workbook workbook = new Workbook(); ValidationCollection validations = workbook.Worksheets[0].Validations; CellArea area = CellArea.CreateCellArea(0, 0, 1, 1); Validation validation = validations[validations.Add(area)]; validation.Type = Aspose.Cells.ValidationType.WholeNumber; validation.Operator = OperatorType.Between; validation.Formula1 = "3"; validation.Formula2 = "1234"; [Visual Basic] Dim workbook as Workbook = new Workbook() Dim validations as ValidationCollection = workbook.Worksheets(0).Validations Dim area as CellArea = CellArea.CreateCellArea(0, 0, 1, 1); Dim validation as Validation = validations(validations.Add(area)) validation.Type = ValidationType.WholeNumber validation.Operator = OperatorType.Between validation.Formula1 = "3" validation.Formula2 = "1234" Represents the operator for the data validation. Represents the validation alert style. Represents the data validation type. Represents the data validation input message. Represents the title of the data-validation input dialog box. Represents the data validation error message. Represents the title of the data-validation error dialog box. Indicates whether the data validation input message will be displayed whenever the user selects a cell in the data validation range. Indicates whether the data validation error message will be displayed whenever the user enters invalid data. Indicates whether blank values are permitted by the range data validation. Gets the value or expression associated with this validation. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The value or expression associated with this validation. Gets the value or expression associated with this validation. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The value or expression associated with this validation. Gets the value or expression associated with this validation for specific cell. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The row index. The column index. The value or expression associated with this validation. Gets the value or expression associated with this validation for specific cell. Whether the formula needs to be formatted as R1C1. Whether the formula needs to be formatted by locale. The row index. The column index. The value or expression associated with this validation. Sets the value or expression associated with this validation. The value or expression associated with this format condition. Whether the formula is R1C1 formula. Whether the formula is locale formatted. Sets the value or expression associated with this validation. The value or expression associated with this format condition. Whether the formula is R1C1 formula. Whether the formula is locale formatted. Represents the value or expression associated with the data validation. Represents the value or expression associated with the data validation. Get the value for list of the validation for the specified cell. The row index. The column index. The value to produce the list of this validation for the specified cell. If the list references to a range, then the returned value will be a object; Otherwise the returned value may be null, object[], or simple object. Only for validation whose type is List and has been applied to given cell, otherwise null will be returned. Represents the first value associated with the data validation. Represents the second value associated with the data validation. Get the value of validation on the specific cell. The row index. The column index. Indicates whether getting the first value. Indicates whether data validation displays a drop-down list that contains acceptable values. Gets all which contain the data validation settings. Applies the validation to the area. The area. It is equivalent to use with checking intersection and edge. Applies the validation to the area. The area. Whether check the intersection of given area with existing validations' areas. If one validation has been applied in given area(or part of it), then the existing validation should be removed at first from given area. Otherwise corruption may be caused for the generated Validations. If user is sure that the added area does not intersect with any existing area, this parameter can be set as false for performance consideration. Whether check the edge of this validation's applied areas. Validation's internal settings depend on the top-left one of its applied ranges, so if given area will become the new top-left one of the applied ranges, the internal settings should be changed and rebuilt, otherwise unexpected result may be caused. If user is sure that the added area is not the top-left one, this parameter can be set as false for performance consideration. In this method, we will remove all old validations in given area. For the top-left one of Validation's applied ranges, firstly its StartRow is smallest, secondly its StartColumn is the smallest one of those areas who have the same smallest StartRow. Applies the validation to given areas. The areas. Whether check the intersection of given area with existing validations' areas. If one validation has been applied in given area(or part of it), then the existing validation should be removed at first from given area. Otherwise corruption may be caused for the generated Validations. If user is sure that all the added areas do not intersect with any existing area, this parameter can be set as false for performance consideration. Whether check the edge of this validation's applied areas. Validation's internal settings depend on the top-left one of its applied ranges, so if one of given areas will become the new top-left one of the applied ranges, the internal settings should be changed and rebuilt, otherwise unexpected result may be caused. If user is sure that no one of those added areas is the top-left, this parameter can be set as false for performance consideration. In this method, we will remove all old validations in given area. For the top-left one of Validation's applied ranges, firstly its StartRow is smallest, secondly its StartColumn is the smallest one of those areas who have the same smallest StartRow. Remove the validation settings in the range. the areas where this validation settings should be removed. Removes this validation from given areas. the areas where this validation settings should be removed. Remove the validation settings in the cell. The row index. The column index. Copy validation. The source validation. The copy option. Represents the data validation alert style. Information alert style. Stop alert style. Warning alert style. Represents data validation collection. [C#] Workbook workbook = new Workbook(); ValidationCollection validations = workbook.Worksheets[0].Validations; CellArea area = CellArea.CreateCellArea(0, 0, 1, 1); Validation validation = validations[validations.Add(area)]; validation.Type = Aspose.Cells.ValidationType.List; validation.Formula1 = "a,b,c,d"; [Visual Basic] Dim workbook as Workbook = new Workbook() Dim validations as ValidationCollection = workbook.Worksheets(0).Validations Dim area as CellArea = CellArea.CreateCellArea(0, 0, 1, 1); Dim validation as Validation = validations(validations.Add(area)) validation.Type = ValidationType.List validation.Formula1 = "a,b,c,d"; Adds a data validation to the collection. object index. NOTE: This member is now obsolete. Instead, please use ValidationCollection.Add(CellArea) method. This property will be removed 12 months later since JANUARY 2015. Aspose apologizes for any inconvenience you may have experienced. Adds a data validation to the collection. The area contains this validation. object index. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Removes all validation setting on the cell. The row index of the cell. The column index of the cell. Removes all validation setting on the range.. The range which contains the validations setting. Gets the validation applied to given cell. The row index. The column index. Returns a object or null if there is no validation for given cell Represents data validation type. Any value validation type. Whole number validation type. Decimal validation type. List validation type. Date validation type. Time validation type. Text length validation type. Custom validation type. Represents an outline on a worksheet. Indicates if the summary row will be positioned below the detail rows in the outline. Indicates if the summary column will be positioned to the right of the detail columns in the outline. Represents all Pane objects shown in the specified window. Gets and sets the first visible row of the bottom pane. Gets and sets the first visible column of the right pane. Gets and sets the active pane. Represents state of the sheet's pane. Panes are frozen, but were not before being frozen. Panes are frozen and were split before being frozen. Panes are split, but not frozen. Panes are not frozen and not split. Represents the view type of the worksheet. Represents the states for sheet visibility. Indicates the sheet is visible. Indicates the sheet is hidden, but can be shown by the user via the user interface. Indicates the sheet is hidden and cannot be shown in the user interface (UI). This state is only available programmatically. Warning info Get warning type. Get warning type. NOTE: This member is now obsolete. Instead, please use WarningInfo.Type property, instead. This property will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Get description of warning info. The error object. Gets and sets the corrected object. WaringType NOTE: This enum is now obsolete. Instead, please use ExceptionType enum, instead. This property will be removed 12 months later since December 2024. Aspose apologizes for any inconvenience you may have experienced. Font substitution warning type when a font has not been found, this warning type can be get. Duplicate defined name is found in the file. Unsupported file format. Invalid text of the defined name. Invalid the font name. Invalid autofilter range. The file is corrupted. Out of MS Excel limitation error. Invalid data. Invalid formula. Invalid operator. Represents a root object to create an Excel spreadsheet. The Workbook class denotes an Excel spreadsheet. Each spreadsheet can contain multiple worksheets. The basic feature of the class is to open and save native excel files. The class has some advanced features like copying data from other Workbooks, combining two Workbooks, converting Excel to PDF, rendering Excel to image and protecting the Excel spreadsheet. The following example loads a Workbook from an Excel file named designer.xls and makes the horizontal and vertical scroll bars invisible. It then replaces two string values with an Integer value and string value respectively within the spreadsheet and finally save the workbook as Excel xlsx file. [C#] //Open a designer file string designerFile = "designer.xls"; Workbook workbook = new Workbook(designerFile); //Set scroll bars workbook.Settings.IsHScrollBarVisible = false; workbook.Settings.IsVScrollBarVisible = false; //Replace the placeholder string with new values int newInt = 100; workbook.Replace("OldInt", newInt); string newString = "Hello!"; workbook.Replace("OldString", newString); workbook.Save("result.xlsx"); [Visual Basic] 'Open a designer file Dim designerFile as String = "\designer.xls" Dim workbook as Workbook = new Workbook(designerFile) 'Set scroll bars workbook.IsHScrollBarVisible = False workbook.IsVScrollBarVisible = False 'Replace the placeholder string with new values Dim newInt as Integer = 100 workbook.Replace("OldInt", newInt) Dim newString as String = "Hello!" workbook.Replace("OldString", newString) workbook.Save("result.xlsx") Represents the workbook settings. Initializes a new instance of the class. The following code shows how to use the Workbook constructor to create and initialize a new instance of the class. [C#] Workbook workbook = new Workbook(); [Visual Basic] Dim workbook as Workbook = new Workbook() The default file format type is Xlsx. If you want to create other types of files, please use Workbook(FileFormatType). Initializes a new instance of the class. The new file format. The following code shows how to use the Workbook constructor to create and initialize a new instance of the class with various file format type. [C#] Workbook workbook = new Workbook(FileFormatType.Xlsx); [Visual Basic] Dim workbook as Workbook = new Workbook(FileFormatType.Xlsx) The default file format type is Excel97To2003. Initializes a new instance of the class and open a file. The file name. Initializes a new instance of the class and open a stream. The stream. Initializes a new instance of the class and open a file. The file name. The load options Initializes a new instance of the class and open stream. The stream. The load options Initializes a new instance of the class and open a file asynchronously. The file name. Initializes a new instance of the class and open a stream asynchronously. The stream. Initializes a new instance of the class and open a file asynchronously. The file name. The load options Initializes a new instance of the class and open stream asynchronously. The stream. The load options Parses all formulas which have not been parsed when they were loaded from template file or set to a cell. Whether ignore error for invalid formula. For one invalid formula, if ignore error then this formula will be ignored and the process will continue to parse other formulas, otherwise exception will be thrown. Starts the session that uses caches to access data. options of data access If the cache of specified data access requires some data models in worksheet to be "read-only", then corresponding data models in every worksheet in this workbook will be taken as "read-only" and user should not change any of them.

After finishing the access to the data, should be invoked with same options to clear all caches and recover normal access mode.

Closes the session that uses caches to access data. options of data access Saves the workbook to the disk. The file name. The save format type. Save the workbook to the disk. Saves the workbook to the disk. The file name. The save options. Saves the workbook to the stream. The file stream. The save file format type. Saves the workbook to the stream. The file stream. The save options. Saves Excel file to a MemoryStream object and returns it. MemoryStream object which contains an Excel file. This method provides same function as Save method and only save the workbook as Excel97-2003 xls file. It's mainly for calling from COM clients. Saves the workbook to the disk asynchronously. The file name. The save format type. Saves the workbook to the disk asynchronously. The file name. The save options. Saves the workbook to the stream asynchronously. The file stream. The save file format type. Saves the workbook to the stream asynchronously. The file stream. The save options. Save the workbook to the disk asynchronously. Saves Excel file to a MemoryStream object and returns it asynchronously. MemoryStream object which contains an Excel file. This method provides same function as Save method and only save the workbook as Excel97-2003 xls file. It's mainly for calling from COM clients. Gets the collection in the spreadsheet. collection Indicates whether license is set. Remove all unused styles. Creates a new style. Returns a style object. Creates a new style. Incidates whether clones the default style Returns a style object. Creates built-in style by given type. The builtin style stype. object Creates a object. Returns a object. Replaces a cell's value with a new string. [C#] Workbook workbook = new Workbook(); //...... workbook.Replace("AnOldValue", "NewValue"); [Visual Basic] Dim workbook As Workbook = New Workbook() '........ workbook.Replace("AnOldValue", "NewValue") Cell placeholder String value to replace Replaces a cell's value with a new integer. [C#] Workbook workbook = new Workbook(); //...... int newValue = 100; workbook.Replace("AnOldValue", newValue); [Visual Basic] Dim workbook As Workbook = New Workbook() '......... Dim NewValue As Integer = 100 workbook.Replace("AnOldValue", NewValue) Cell placeholder Integer value to replace Replaces a cell's value with a new double. [C#] Workbook workbook = new Workbook(); //...... double newValue = 100.0; workbook.Replace("AnOldValue", newValue); [Visual Basic] Dim workbook As Workbook = New Workbook() '......... Dim NewValue As Double = 100.0 workbook.Replace("AnOldValue", NewValue) Cell placeholder Double value to replace Replaces a cell's value with a new string array. [C#] Workbook workbook = new Workbook(); //...... string[] newValues = new string[]{"Tom", "Alice", "Jerry"}; workbook.Replace("AnOldValue", newValues, true); [Visual Basic] Dim workbook As Workbook = New Workbook() '............. Dim NewValues() As String = New String() {"Tom", "Alice", "Jerry"} workbook.Replace("AnOldValue", NewValues, True) Cell placeholder String array to replace True - Vertical, False - Horizontal Replaces cells' values with an integer array. [C#] Workbook workbook = new Workbook(); //...... int[] newValues = new int[]{1, 2, 3}; workbook.Replace("AnOldValue", newValues, true); [Visual Basic] Dim workbook As Workbook = New Workbook() '........... Dim NewValues() As Integer = New Integer() {1, 2, 3} workbook.Replace("AnOldValue", NewValues, True) Cell placeholder Integer array to replace True - Vertical, False - Horizontal Replaces cells' values with a double array. [C#] Workbook workbook = new Workbook(); //...... double[] newValues = new double[]{1.23, 2.56, 3.14159}; workbook.Replace("AnOldValue", newValues, true); [Visual Basic] Dim workbook As Workbook = New Workbook() '........... Dim NewValues() As Double = New Double() {1.23, 2.56, 3.14159} workbook.Replace("AnOldValue", NewValues, True) Cell placeholder Double array to replace True - Vertical, False - Horizontal Replaces cells' values with data from a . [C#] Workbook workbook = new Workbook(); DataTable myDataTable = new DataTable("Customers"); // Adds data to myDataTable //........ workbook.Replace("AnOldValue", myDataTable); [Visual Basic] Dim workbook As Workbook = New Workbook() Dim myDataTable As DataTable = New DataTable("Customers") ' Adds data to myDataTable '............. workbook.Replace("AnOldValue", myDataTable) Cell placeholder DataTable to replace Replaces cells' values with new data. The boolean value to be replaced. New value. Can be string, integer, double or DateTime value. Replaces cells' values with new data. The integer value to be replaced. New value. Can be string, integer, double or DateTime value. Replaces a cell's value with a new string. Cell placeholder String value to replace The replace options Copies another Workbook object. Source Workbook object. The options of copying other workbook. It's very simple to clone an Excel file. Copies data from a source Workbook object. Source Workbook object. Combines another Workbook object. Another Workbook object. Merge Excel, ODS , CSV and other files to one file. Returns colors in the palette for the spreadsheet. The palette has 56 entries, each represented by an RGB value. Gets the style in the style pool. All styles in the workbook will be gathered into a pool. There is only a simple reference index in the cells. The index. The style in the pool corresponds to given index, may be null. If the returned style is changed, the style of all cells(which refers to this style) will be changed. Gets number of the styles in the style pool. Gets all fonts in the style pool. Gets the named style in the style pool. name of the style named style, maybe null. Changes the palette for the spreadsheet in the specified index. Color structure. Palette index, 0 - 55.

The palette has 56 entries, each represented by an RGB value.

If you set a color which is not in the palette, it will not take effect.

So if you want to set a custom color, please change the palette at first.

The following is the standard color palette.

Color Red Green Blue Black 0 0 0 White 255 255 255 Red 255 0 0 Lime 0 255 0 Blue 0 0 255 Yellow 255 255 0 Magenta 255 0 255 Cyan 0 255 255 Maroon 128 0 0 Green 0 128 0 Navy 0 0 128 Olive 128 128 0 Purple 128 0 128 Teal 0 128 128 Silver 192 192 192 Gray 128 128 128 Color17 153 153 255 Color18 153 51 102 Color19 255 255 204 Color20 204 255 255 Color21 102 0 102 Color22 255 128 128 Color23 0 102 204 Color24 204 204 255 Color25 0 0 128 Color26 255 0 255 Color27 255 255 0 Color28 0 255 255 Color29 128 0 128 Color30 128 0 0 Color31 0 128 128 Color32 0 0 255 Color33 0 204 255 Color34 204 255 255 Color35 204 255 204 Color36 255 255 153 Color37 153 204 255 Color38 255 153 204 Color39 204 153 255 Color40 255 204 153 Color41 51 102 255 Color42 51 204 204 Color43 153 204 0 Color44 255 204 0 Color45 255 153 0 Color46 255 102 0 Color47 102 102 153 Color48 150 150 150 Color49 0 51 102 Color50 51 153 102 Color51 0 51 0 Color52 51 51 0 Color53 153 51 0 Color54 153 51 102 Color55 51 51 153 Color56 51 51 51
Checks if a color is in the palette for the spreadsheet. Color structure. Returns true if this color is in the palette. Otherwise, returns false Calculates the result of formulas. For all supported formulas, please see the list at https://docs.aspose.com/display/cellsnet/Supported+Formula+Functions Calculates the result of formulas. Indicates if hide the error in calculating formulas. The error may be unsupported function, external links, etc. Calculating formulas in this workbook. Options for calculation Calculates the result of formulas asynchronously. For all supported formulas, please see the list at https://docs.aspose.com/display/cellsnet/Supported+Formula+Functions Calculates the result of formulas asynchronously. Indicates if hide the error in calculating formulas. The error may be unsupported function, external links, etc. Calculating formulas in this workbook asynchronously. Options for calculation Refreshes dynamic array formulas(spill into new range of neighboring cells according to current data) Other formulas in the workbook will not be calculated recursively even if they were used by dynamic array formulas. Whether calculates and updates cell values for those dynamic array formulas Refreshes dynamic array formulas(spill into new range of neighboring cells according to current data) Whether calculates and updates cell values for those dynamic array formulas The options for calculating formulas For performance consideration, we do not refresh all dynamic array formulas automatically when the formula itself or the data it references to changed. So user need to call this method manually after those operations which may influence dynamic array formulas, such as importing/setting cell values, inserting/deleting rows/columns/ranges, ...etc.

For most formulas with functions, calculating the spill range also needs to calculating the formula, so in general true value for "calculate" flag is preferred. If the formula is simple, such as a range reference or array(for example "=C1:E5", "={1,2;3,4}", ...), simple function on a range or array(for example "=ABS(C1:E5)", "=1+{1,2;3,4}", ...), and all formulas will be calculated later(such as by ), then using false vlaue for "calculate" flag may avoid the duplicated calculation for the benefit of performance.
Gets or sets the default object of the workbook. The DefaultStyle property is useful to implement a Style for the whole Workbook. The following code creates and instantiates a new Workbook and sets a default to it. [C#] Workbook workbook = new Workbook(); Style defaultStyle = workbook.DefaultStyle; defaultStyle.Font.Name = "Tahoma"; workbook.DefaultStyle = defaultStyle; [Visual Basic] Dim workbook as Workbook = new Workbook() Dim defaultStyle as Style = workbook.DefaultStyle defaultStyle.Font.Name = "Tahoma" workbook.DefaultStyle = defaultStyle Find best matching Color in current palette. Raw color. Best matching color. Indicates if this spreadsheet is digitally signed. Set Encryption Options. The encryption type. The key length. Protects a workbook. Protection type. Password to protect the workbook. Protects a shared workbook. Password to protect the workbook. Unprotects a workbook. Password to unprotect the workbook. Unprotects a shared workbook. Password to unprotect the workbook. Indicates whether structure or window is protected with password. Removes VBA/macro from this spreadsheet. Gets the in a spreadsheet. Removes digital signature from this spreadsheet. Accepts all tracked changes in the workbook. Indicates if this spreadsheet contains macro/VBA. Gets if the workbook has any tracked changes Gets and sets the current file name. If the file is opened by stream and there are some external formula references, please set the file name. Gets the factory for building ICellsDataTable from custom objects Gets a DataSorter object to sort data. Removes all external links in the workbook. NOTE: This member is now obsolete. Instead, please use ExternalLinkCollection.Clear() method. This method will be removed 12 months later since December 2021. Aspose apologizes for any inconvenience you may have experienced. Gets theme color. The theme color type. The theme color. Sets the theme color The theme color type. the theme color Gets the theme name. Customs the theme. The theme name The theme colors The length of colors should be 12. Array indexTheme type0Backgournd11Text12Backgournd23Text24Accent15Accent26Accent37Accent48Accent59Accent610Hyperlink11Followed Hyperlink Copies the theme from another workbook. Source workbook. Indicates whether this workbook contains external links to other data sources. Whether this workbook contains external links to other data sources. NOTE: This member is now obsolete. Instead, please use ExternalLinkCollection.Count to check whether there are external links in this workbook. This method will be removed 12 months later since December 2021. Aspose apologizes for any inconvenience you may have experienced. Updates definition of custom functions. Special definition of custom functions for user's special requirement. This method can be used for some special scenarios. For example, if user needs some parameters of some custom functions be calculated in array mode, then user may provide their own definition with implemented for those functions. After the data of formulas being updated, those specified parameters will be calculated in array mode automatically when calculating corresponding custom functions. If this workbook contains external links to other data source, Aspose.Cells will attempt to retrieve the latest data from give sources. Workbooks that will be used to update data of external links referenced by this workbook. The match of those workbooks with external links is determined by and . So please make sure has been specified with the proper value for every workbook so they can be linked to corresponding external link. If corresponding external link cannot be found for one workbook, then this workbook will be ignored. So when you set a formula later with one new external link which you intend to make the ignored workbook be linked to it, the link cannot be performed until you call this this method again with those workbooks. Returns a 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

[C#] Workbook workbook = new Workbook(); DocumentProperty doc = workbook.BuiltInDocumentProperties["Author"]; doc.Value = "John Smith"; [Visual Basic] Dim workbook as Workbook = New Workbook() Dim doc as DocumentProperty = workbook.BuiltInDocumentProperties("Author") doc.Value = "John Smith"
Returns a collection that represents all the custom document properties of the spreadsheet. [C#] Workbook excel = new Workbook(); excel.CustomDocumentProperties.Add("Checked by", "Jane"); [Visual Basic] Dim excel as Workbook = New Workbook() excel.CustomDocumentProperties.Add("Checked by", "Jane") Gets and sets the file format. Gets and sets the interrupt monitor. Gets the list of objects in the workbook. Represents a Custom XML Data Storage Part (custom XML data within a package). Gets mashup data. Gets and sets the XML file that defines the Ribbon UI. Gets and sets the absolute path of the file. Only used for external links. Gets the collection. Imports/Updates an XML data file into the workbook. the url/path of the xml file. the destination sheet name. the destination row the destination column The following code imports xml data into worksheet 'Sheet 1' at Cell A1. Workbook wb = new Workbook("Book1.xlsx"); wb.ImportXml("xml.xml", "Sheet1", 0, 0); wb.Save("output.xlsx"); Imports/Updates an XML data file into the workbook. the xml file stream. the destination sheet name. the destination row. the destination column. Export XML data linked by the specified XML map. name of the XML map that need to be exported the export path The following code exported the data linked by the first XmlMap. Workbook wb = new Workbook("Book1.xlsx"); //Make sure that the source xlsx file contains a XmlMap. XmlMap xmlMap = wb.Worksheets.XmlMaps[0]; wb.ExportXml(xmlMap.Name, "output.xml"); Export XML data. name of the XML map that need to be exported the export stream Sets digital signature to an spreadsheet file (Excel2007 and later). Only support adding Xmldsig Digital Signature Adds digital signature to an OOXML spreadsheet file (Excel2007 and later). Only support adding Xmldsig Digital Signature to an OOXML spreadsheet file Gets digital signature from file. Removes personal information. Gets data model in the workbook. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Encapsulates the object that represents a single worksheet. The following example shows how to freeze panes and insert hyperlink to worksheet with .Net or VB. [C#] Workbook workbook = new Workbook(); Worksheet sheet = workbook.Worksheets[0]; //Freeze panes at "AS40" with 10 rows and 10 columns sheet.FreezePanes("AS40", 10, 10); //Add a hyperlink in Cell A1 sheet.Hyperlinks.Add("A1", 1, 1, "http://www.aspose.com"); [Visual Basic] Dim workbook as Workbook = new Workbook() Dim sheet as Worksheet = workbook.Worksheets(0) 'Freeze panes at "AS40" with 10 rows and 10 columns sheet.FreezePanes("AS40", 10, 10) 'Add a hyperlink in Cell A1 sheet.Hyperlinks.Add("A1", 1, 1, "http://www.aspose.com") Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Represents the various types of protection options available for a worksheet. Supports advanced protection options in ExcelXP and above version. This property can protect worksheet in all versions of Excel file and support advanced protection options in ExcelXP and above version. Gets and sets the unique id, it is same as {15DB5C3C-A5A1-48AF-8F25-3D86AC232D4F}. Gets the window panes. If the window is not split or frozen. Gets the workbook object which contains this sheet. Gets the collection. Gets in the worksheet. Gets all pivot tables in this worksheet. Represents worksheet type. Gets or sets the name of the worksheet. The max length of sheet name is 31. And you cannot assign same name(case insensitive) to two worksheets. For example, you cannot set "SheetName1" to the first worksheet and set "SHEETNAME1" to the second worksheet. Indicates whether to show formulas or their results. Gets or sets a value indicating whether the gridlines are visible.Default is true. Gets or sets a value indicating whether the worksheet will display row and column headers. Default is true. Indicates whether the pane has horizontal or vertical splits, and whether those splits are frozen. True if zero values are displayed. Indicates if the specified worksheet is displayed from right to left instead of from left to right. Default is false. Indicates whether to show outline. Indicates whether this worksheet is selected when the workbook is opened. Freezes panes at the specified cell in the worksheet. Row index. Column index. Number of visible rows in top pane, no more than row index. Number of visible columns in left pane, no more than column index.

Row index and column index cannot all be zero. Number of rows and number of columns also cannot all be zero.

The first two parameters specify the froze position and the last two parameters specify the area frozen on the left top pane.

Gets the freeze panes. Row index. Column index. Number of visible rows in top pane, no more than row index. Number of visible columns in left pane, no more than column index. Return whether the worksheet is frozen Splits window. Freezes panes at the specified cell in the worksheet. Cell name. Number of visible rows in top pane, no more than row index. Number of visible columns in left pane, no more than column index. Row index and column index cannot all be zero. Number of rows and number of columns also cannot all be zero. Unfreezes panes in the worksheet. Removes split window. Gets all ListObjects in this worksheet. Specifies the internal identifier for the sheet. Gets the collection. Gets the collection. Adds page break. Gets the collection. Copies contents and formats from another worksheet. Source worksheet. Copies contents and formats from another worksheet. Source worksheet. You can copy data from another worksheet in the same file or another file. However, this method does not support to copy drawing objects, such as comments, images and charts. Autofits the column width. Column index. First row index. Last row index. This method autofits a row based on content in a range of cells within the row. Autofits all columns in this worksheet. Autofits all columns in this worksheet. The auto fitting options Autofits the column width. Column index. AutoFitColumn is an imprecise function. Autofits the columns width. First column index. Last column index. AutoFitColumn is an imprecise function. Autofits the columns width. First column index. Last column index. The auto fitting options AutoFitColumn is an imprecise function. Autofits the columns width. First row index. First column index. Last row index. Last column index. AutoFitColumn is an imprecise function. Autofits the columns width. First row index. First column index. Last row index. Last column index. The auto fitting options AutoFitColumn is an imprecise function. Autofits the row height. Row index. First column index. Last column index. This method autofits a row based on content in a range of cells within the row. Autofits the row height. Row index. First column index. Last column index. The auto fitter options This method autofits a row based on content in a range of cells within the row. Autofits all rows in this worksheet. Autofits all rows in this worksheet. True,only autofits the row height when row height is not customed. Autofits all rows in this worksheet. The auto fitter options Autofits row height in a range. Start row index. End row index. Autofits row height in a range. Start row index. End row index. The options of auto fitter. Autofits row height in a rectangle range. Start row index. End row index. Start column index. End column index. Autofits the row height. Row index. AutoFitRow is an imprecise function. Represents the page setup description in this sheet. Represents auto filter for the specified worksheet. Gets the settings of advanced filter. Filters data using complex criteria. Indicates whether filtering the list in place. The list range. The criteria range. The range where copying data to. Only displaying or copying unique rows. Removes the auto filter of the worksheet. Indicates whether this worksheet has auto filter. Indicates whether the Transition Formula Evaluation (Lotus compatibility) option is enabled. Indicates whether the Transition Formula Entry (Lotus compatibility) option is enabled. Indicates the visible state for this sheet. Sets the visible options. Whether the worksheet is visible Whether to ignore error if this option is not valid. Represents if the worksheet is visible. Selects a range. The start row. The start column The number of rows. The number of columns True means removing other selected range and only select this range. Removes all drawing objects in this worksheet. Clears all comments in designer spreadsheet. Gets the sparkline groups in the worksheet. Gets a collection Gets the collection. Gets a collection. Gets a collection. Gets a collection. Represents a collection of in a worksheet. Returns all drawing shapes in this worksheet. Get the Slicer collection in the worksheet Get the Timeline collection in the worksheet Protects worksheet. Protection type. This method protects worksheet without password. It can protect worksheet in all versions of Excel file. Protects worksheet. Protection type. Password. If the worksheet is already protected by a password, please supply the old password. Otherwise, you can set a null value or blank string to this parameter. This method can protect worksheet in all versions of Excel file. [C#] //Instantiating a Workbook object Workbook excel = new Workbook("template.xlsx"); //Accessing the first worksheet in the Excel file Worksheet worksheet = excel.Worksheets[0]; //Protecting the worksheet with a password worksheet.Protect(ProtectionType.All, "aspose", null); //Saving the modified Excel file in default (that is Excel 20003) format excel.Save("output.xls"); //Closing the file stream to free all resources [Visual Basic] 'Creating a file stream containing the Excel file to be opened Dim fstream As FileStream = New FileStream("book1.xls", FileMode.Open) 'Instantiating a Workbook object and Opening the Excel file through the file stream Dim excel As Workbook = New Workbook(fstream) 'Accessing the first worksheet in the Excel file Dim worksheet As Worksheet = excel.Worksheets(0) 'Protecting the worksheet with a password worksheet.Protect(ProtectionType.All, "aspose", DBNull.Value.ToString()) 'Saving the modified Excel file in default (that is Excel 20003) format excel.Save("output.xls") 'Closing the file stream to free all resources fstream.Close() Unprotects worksheet. This method unprotects worksheet which is protected without password. Unprotects worksheet. Password If the worksheet is protected without a password, you can set a null value or blank string to password parameter. Gets the index of sheet in the worksheet collection. Moves the sheet to another location in the spreadsheet. Destination sheet index. Indicates if the worksheet is protected. Gets the data validation setting collection in the worksheet. Gets the allow edit range collection in the worksheet. Gets error check setting applied on certain ranges. Gets the outline on this worksheet. Represents first visible row index. Represents first visible column index. Replaces all cells' text with a new string. Old string value. New string value. Represents the scaling factor in percentage. It should be between 10 and 400. Please set the view type first. Gets and sets the view type. Indicates whether the specified worksheet is shown in normal view or page break preview. Indicates whether the ruler is visible. This property is only applied for page break preview. Gets selected ranges of cells in the designer spreadsheet. An which contains selected ranges. Represents worksheet tab color. This feature is only supported in ExcelXP(Excel2002) and later versions. If you save file as Excel97 or Excel2000 format, it will be omitted. Gets worksheet code name. Gets and sets worksheet background image. Gets the ConditionalFormattings in the worksheet. Gets or sets the active cell in the worksheet. Gets an object representing the identifier information associated with a worksheet. Worksheet.CustomProperties provide a preferred mechanism for storing arbitrary data. It supports legacy third-party document components, as well as those situations that have a stringent need for binary parts. Gets automatic page breaks. The print options The automatic page breaks areas. Each cell area represents a paper. Gets all objects of the worksheet. Returns a string represents the current Worksheet object. Gets the collection of . Starts the session that uses caches to access the data in this worksheet. options of data access After finishing the access to the data, should be invoked with same options to clear all caches and recover normal access mode. Closes the session that uses caches to access the data in this worksheet. options of data access Converts the formula reference style. The formula to be converted. Which reference style to convert the formula to. If the original formula is of A1 reference style, then this value should be true so the formula will be converted from A1 to R1C1 reference style; If the original formula is of R1C1 reference style, then this value should be false so the formula will be converted from R1C1 to A1 reference style; The row index of the base cell. The column index of the base cell. The converted formula. Calculates a formula. Formula to be calculated. Calculated formula result. Calculates a formula expression directly. Formula to be calculated. Options for calculating formula Calculated result of given formula. The returned object may be of possible types of , or ReferredArea. The formula will be calculated just like it has been set to cell A1. And the formula will be taken as normal formula. If you need the formula be calculated as an array formula and to get an array for the calculated result, please use instead. Calculates a formula expression directly. Formula to be calculated. Options for parsing formula. Options for calculating formula. The row index of the base cell. The column index of the base cell. The calculation data. It is used for the situation that user needs to calculate some static formulas when implementing custom calculation engine. For such kind of situation, user needs to specify it with the calculation data provided for . Calculated result of given formula. The returned object may be of possible types of , or ReferredArea. The formula will be calculated just like it has been set to the specified base cell. And the formula will be taken as normal formula. If you need the formula be calculated as an array formula and to get an array for the calculated result, please use instead. Calculates a formula as array formula. Formula to be calculated. Options for calculating formula Calculates a formula as array formula. Formula to be calculated. Options for calculating formula the maximum row count of resultant data. If it is non-positive or greater than the actual row count, then actual row count will be used. the maximum column count of resultant data. If it is non-positive or greater than the actual row count, then actual column count will be used. Calculated formula result. The formula will be taken as dynamic array formula to calculate the dimension and result. User specified maximum dimension is used for cases that the calculated result is large data set (for example, the calculated result may correspond to a whole row or column data) but user does not need so large an array according to business requirement or for performance consideration. Calculates a formula as array formula. Formula to be calculated. Options for parsing formula Options for calculating formula The row index of the base cell. The column index of the base cell. The maximum row count of resultant data. If it is non-positive or greater than the actual row count, then actual row count will be used. The maximum column count of resultant data. If it is non-positive or greater than the actual row count, then actual column count will be used. The calculation data. It is used for the situation that user needs to calculate some static formulas when implementing custom calculation engine. For such kind of situation, user needs to specify it with the calculation data provided for . Calculated formula result. The formula will be taken as dynamic array formula to calculate the dimension and result. User specified maximum dimension is used for cases that the calculated result is large data set (for example, the calculated result may correspond to a whole row or column data) but user does not need so large an array according to business requirement or for performance consideration. Calculates all formulas in this worksheet. Options for calculation True means if the worksheet' cells depend on the cells of other worksheets, the dependent cells in other worksheets will be calculated too. False means all the formulas in the worksheet have been calculated and the values are right. Query cell areas that mapped/linked to the specific path of xml map. xml element path e.g. A xml map element structure: -RootElement |-Attribute1 |-SubElement |-Attribute2 |-Attribute3 To query "Attribute1", path is "/RootElement/@Attribute1" To query "Attribute2", path is "/RootElement/SubElement/@Attribute2" To query whole "SubElement", path is "/RootElement/SubElement" Specify an xml map if you want to query for the specific path within a specific map list that mapped/linked to the specific path of xml map, an empty list is returned if nothing is mapped/linked. Gets collection of cells on this worksheet being watched in the 'watch window'. Refreshes all the PivotTables in this Worksheet. Refreshes all the PivotTables in this Worksheet. The option for refreshing data source of pivot table. Encapsulates a collection of objects. [C#] Workbook workbook = new Workbook(); WorksheetCollection sheets = workbook.Worksheets; //Add a worksheet sheets.Add(); //Change the name of a worksheet sheets[0].Name = "First Sheet"; //Set the active sheet to the second worksheet sheets.ActiveSheetIndex = 1; [Visual Basic] Dim excel as Workbook = new Workbook() Dim sheets as WorksheetCollection = excel.Worksheets 'Add a worksheet sheets.Add() 'Change the name of a worksheet sheets(0).Name = "First Sheet" 'Set the active sheet to the second worksheet sheets.ActiveSheetIndex = 1 Gets the list of task panes. Gets the list of task panes. Gets the list of threaded comment authors. Indicates whether refresh all connections on opening file in MS Excel. Creates a object from an address of the range. The address of the range. The sheet index. A object Creates a object from an address of the range. The address of the range. The sheet index. A object Gets the collection of all the Name objects in the spreadsheet. Gets the element at the specified index. The zero based index of the element. The element at the specified index. Gets the element with the specified name. Worksheet name The element with the specified name. Gets the worksheet by the code name. Worksheet code name. The element with the specified code name. Represents the name of active worksheet when the spreadsheet is opened. Represents the index of active worksheet when the spreadsheet is opened. Sheet index is zero based. 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 a worksheet. The sheet index The sheet type. Returns an inserted worksheet. Insert a worksheet. The sheet index The sheet type. The sheet name. Returns an inserted worksheet. Adds a worksheet to the collection. Worksheet type. object index. [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) Swaps the two sheets. The first worksheet. The second worksheet. Adds a worksheet to the collection. object index. Adds a worksheet to the collection. Worksheet name object. Adds addin function into the workbook the file contains the addin functions the addin function name 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. ID of the data which contains given addin function Adds addin function into the workbook ID of the data which contains addin functions, can be got by the first call of for the same addin file. the addin function name URL of the addin file which contains addin functions Removes the element at a specified name. The name of the element to remove. Removes the element at a specified index. The index value of the element to remove. Clear all worksheets. A workbook must contains a worksheet. Adds a worksheet to the collection and copies data from an existed worksheet. Name of source worksheet. object index. Specifies an invalid worksheet name. Adds a worksheet to the collection and copies data from an existed worksheet. Index of source worksheet. object index. Copy a group of worksheets. The source worksheets. The names of the copied sheets. Gets the master differential formatting records. Gets Range object by pre-defined name. Name of range. Range object.

Returns null if the named range does not exist.
Gets by pre-defined name or table's name Name of range or table's name. The sheet index. -1 represents global . Indicates whether checking all tables. Gets all pre-defined named ranges in the spreadsheet. 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.
Gets all pre-defined named ranges in the spreadsheet. An array of Range objects.

Returns null if the named range does not exist.
Gets and sets the XML maps in the workbook. Returns a 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

[C#] Workbook workbook = new Workbook(); DocumentProperty doc = workbook.Worksheets.BuiltInDocumentProperties["Author"]; doc.Value = "John Smith"; [Visual Basic] Dim workbook as Workbook = New Workbook() Dim doc as DocumentProperty = workbook.Worksheets.BuiltInDocumentProperties("Author") doc.Value = "John Smith"
Returns a collection that represents all the custom document properties of the spreadsheet. [C#] Workbook workbook = new Workbook(); workbook.Worksheets.CustomDocumentProperties.Add("Checked by", "Jane"); [Visual Basic] Dim workbook as Workbook = New Workbook() workbook.Worksheets.CustomDocumentProperties.Add("Checked by", "Jane") Gets and Sets displayed size when Workbook file is used as an Ole object. Null means no ole size setting. Sets displayed size when Workbook file is used as an Ole object. Start row index. End row index. Start column index. End column index. This method is generally used to adjust display size in ppt file or doc file. Represents external links in a workbook. Gets object. Clears pivot tables from the spreadsheet. Represents revision logs. Refresh all pivot tables and charts with pivot source. Refreshes all the PivotTables in the Excel file. Refreshes all the PivotTables in the Excel file. The option for refreshing data source of the pivot tables. Represents Xml Data Binding information. Represents Xml Data Binding information. Gets source url of this data binding. Represents Xml map information. Returns or sets the name of the object. Gets root element name. Gets an of this map. A collection of objects that represent XmlMap information. Gets the xml map by the specific index. The index. The xml map Add a by the url/path of a xml/xsd file. url/path of a xml/xsd file. object index. The following code adds two XmlMaps by a xsd file and a xml file. Workbook wb = new Workbook(); XmlMapCollection xmlMapCollection = wb.Worksheets.XmlMaps; //Add a XmlMap by a xsd file. xmlMapCollection.Add("schema.xsd"); //Add a XmlMap by a xml file. xmlMapCollection.Add("xml.xml"); wb.Save("twoXmlMaps.xlsx"); Removes all XmlMaps.