NXOpen .NET Reference  12.0.0
Public Member Functions | Protected Member Functions | List of all members
NXOpen.Spreadsheet Class Reference

Represents a class for internal spreadsheet. More...

Inheritance diagram for NXOpen.Spreadsheet:

Public Member Functions

unsafe NXOpen.SpreadsheetCellData GetNumber (int row, int col, int sheet)
 Retrieves a numeric value from a cell. More...
 
unsafe NXOpen.SpreadsheetCellData GetFormula (int row, int col, int sheet)
 Retrieves a formula from a cell. More...
 
unsafe int GetNumberOfSheets ()
 Returns the total number of sheets in the spreadsheet More...
 
unsafe int GetSheetNumber ()
 Returns the current work sheet number of the spreadsheet. More...
 
unsafe int GetSheetNumberOfName (string sheetname)
 Returns sheet number of the sheet with given name. More...
 
unsafe NXOpen.SpreadsheetCellData GetString (int row, int col, int sheet)
 Returns the String in the cell More...
 
unsafe NXOpen.SpreadsheetCellData GetValue (int row, int col, int sheet)
 Returns a number, string or formula depending on the contents of the cell. More...
 
unsafe void SetFormula (int row, int col, NXOpen.SpreadsheetCellData cellvalue, int sheet)
 Stores a formula into a cell. More...
 
unsafe void SetNumber (int row, int col, NXOpen.SpreadsheetCellData cellvalue, int sheet)
 Stores a numeric value in the specified cell of the worksheet. More...
 
unsafe void SetSheetNumber (int sheet)
 Sets the worksheet with specified index as current worksheet More...
 
unsafe void SetString (int row, int col, NXOpen.SpreadsheetCellData cellvalue, int sheet)
 Sets the string in the cell. More...
 
unsafe void Clear ()
 Clears the contents of the current worksheet. More...
 
unsafe void Delete (int start1, int end1, int sheet, int operation)
 Deletes (clears) one or more rows/columns of data from a worksheet. More...
 
unsafe void DeleteSheets (int sheet, int count)
 Deletes specified number of sheets beginning with the specified sheet (from the current worksheet, if no sheet is specified). More...
 
unsafe void EraseRange (int row0, int col0, int row1, int col1, int sheet0, int sheet1)
 Clears the contents of the specified range More...
 
unsafe NXOpen.SpreadsheetCellData EvaluateCell (int row, int col, int sheet)
 Returns the evaluated value of a cell. More...
 
unsafe void InsertSheets (int sheet, int count)
 Inserts specified number of sheets before the specified sheet (or the current work sheet if no sheet is specified). More...
 
unsafe void Terminate ()
 Terminates excel sheet for opened part. More...
 
unsafe void Save ()
 Saves the spreadsheet in the part file. More...
 
unsafe void Recalculate ()
 Recalculates the spreadsheet. More...
 
unsafe void GetSheetNames (out string[] sheetnames)
 Returns list of existing sheet names in the spreadsheet. More...
 
unsafe void GetNamedRange (string rangename, out int[] namedrange)
 Resolves the named reference and returns the range of cells that are named This method returns a list, of the following format: Start Row, Start Column, End Row, End Column, Start Sheet Number, End Sheet Number of the named reference. More...
 
unsafe void SetNamedRange (string rangename, int row0, int col0, int row1, int col1, int sheet)
 Defines a name for the Range of cells. More...
 

Protected Member Functions

override void FreeResource ()
 Free resources associated with the instance. More...
 

Detailed Description

Represents a class for internal spreadsheet.

To call functions from this class, use Spreadsheet object returned by NXOpen.SpreadsheetManager.Open .

Usable only on Windows

Created in NX11.0.0

Member Function Documentation

unsafe void NXOpen.Spreadsheet.Clear ( )

Clears the contents of the current worksheet.

Created in NX11.0.0

License requirements: None.

unsafe void NXOpen.Spreadsheet.Delete ( int  start1,
int  end1,
int  sheet,
int  operation 
)

Deletes (clears) one or more rows/columns of data from a worksheet.

Created in NX11.0.0

License requirements: None.

Parameters
start1From where the deletion should start
end1Upto where the rows should be deleted
sheetThe sheet in which deletion should take place.(Current sheet, if no sheet is specified)
operation1 for row deletion and 2 for column deletion.
unsafe void NXOpen.Spreadsheet.DeleteSheets ( int  sheet,
int  count 
)

Deletes specified number of sheets beginning with the specified sheet (from the current worksheet, if no sheet is specified).

Created in NX11.0.0

License requirements: None.

Parameters
sheetSheet Number, starting from which sheets are to be deleted.
countNumber of sheets to be deleted
unsafe void NXOpen.Spreadsheet.EraseRange ( int  row0,
int  col0,
int  row1,
int  col1,
int  sheet0,
int  sheet1 
)

Clears the contents of the specified range

Created in NX11.0.0

License requirements: None.

Parameters
row0Starting row for range
col0Starting column for range
row1Ending row for range
col1Ending column for range
sheet0Sheet number for start of the range
sheet1Sheet number for end of the range
unsafe NXOpen.SpreadsheetCellData NXOpen.Spreadsheet.EvaluateCell ( int  row,
int  col,
int  sheet 
)

Returns the evaluated value of a cell.

Created in NX11.0.0

License requirements: None.

Parameters
rowRow index of the cell
colColumn index of the cell
sheetSheet index (current worksheet, if zero is specified).
Returns
The value in a spreadsheet cell as either a string or a number
override void NXOpen.Spreadsheet.FreeResource ( )
protected

Free resources associated with the instance.

After this method is called, it is illegal to use the object. In .NET, this method is automatically called when the object is deleted by the garbage collector.

Created in NX11.0.0

License requirements: None.

unsafe NXOpen.SpreadsheetCellData NXOpen.Spreadsheet.GetFormula ( int  row,
int  col,
int  sheet 
)

Retrieves a formula from a cell.

Created in NX11.0.0

License requirements: None.

Parameters
rowRow index of the cell
colColumn index of the cell
sheetSheet index (current worksheet, if zero is specified)
Returns
Retrieves a formula from a cell.
unsafe void NXOpen.Spreadsheet.GetNamedRange ( string  rangename,
out int[]  namedrange 
)

Resolves the named reference and returns the range of cells that are named This method returns a list, of the following format: Start Row, Start Column, End Row, End Column, Start Sheet Number, End Sheet Number of the named reference.

Created in NX11.0.0

License requirements: None.

Parameters
rangenameRange name
namedrangeThe range of cells for given range name
unsafe NXOpen.SpreadsheetCellData NXOpen.Spreadsheet.GetNumber ( int  row,
int  col,
int  sheet 
)

Retrieves a numeric value from a cell.

Created in NX11.0.0

License requirements: None.

Parameters
rowRow index of the cell
colColumn index of the cell
sheetSheet index (current worksheet, if zero is specified)
Returns
Retrieves a numerical value from a cell
unsafe int NXOpen.Spreadsheet.GetNumberOfSheets ( )

Returns the total number of sheets in the spreadsheet

Created in NX11.0.0

License requirements: None.

Returns
Number of sheets in the spreadsheet
unsafe void NXOpen.Spreadsheet.GetSheetNames ( out string[]  sheetnames)

Returns list of existing sheet names in the spreadsheet.

Created in NX11.0.0

License requirements: None.

Parameters
sheetnamesList of sheet names from specified spreadsheet
unsafe int NXOpen.Spreadsheet.GetSheetNumber ( )

Returns the current work sheet number of the spreadsheet.

Created in NX11.0.0

License requirements: None.

Returns
Current work sheet number of the spreadsheet.
unsafe int NXOpen.Spreadsheet.GetSheetNumberOfName ( string  sheetname)

Returns sheet number of the sheet with given name.

Created in NX11.0.0

License requirements: None.

Parameters
sheetnameSheet name
Returns
Work sheet number of the given spreadsheet name.
unsafe NXOpen.SpreadsheetCellData NXOpen.Spreadsheet.GetString ( int  row,
int  col,
int  sheet 
)

Returns the String in the cell

Created in NX11.0.0

License requirements: None.

Parameters
rowRow index of the cell
colColumn index of the cell
sheetSheet index of the cell (current worksheet, if zero is specified).
Returns
Retrieves a string value from a cell
unsafe NXOpen.SpreadsheetCellData NXOpen.Spreadsheet.GetValue ( int  row,
int  col,
int  sheet 
)

Returns a number, string or formula depending on the contents of the cell.

Created in NX11.0.0

License requirements: None.

Parameters
rowRow index of the cell
colColumn index of the cell
sheetSheet index of the cell (current worksheet, if zero is specified).
Returns
The value in a spreadsheet cell as either a string or a number
unsafe void NXOpen.Spreadsheet.InsertSheets ( int  sheet,
int  count 
)

Inserts specified number of sheets before the specified sheet (or the current work sheet if no sheet is specified).

Created in NX11.0.0

License requirements: None.

Parameters
sheetSheet number, before which the sheets are to be inserted.
countNumber of sheets to be inserted.
unsafe void NXOpen.Spreadsheet.Recalculate ( )

Recalculates the spreadsheet.

Created in NX11.0.0

License requirements: None.

unsafe void NXOpen.Spreadsheet.Save ( )

Saves the spreadsheet in the part file.

Created in NX11.0.0

License requirements: None.

unsafe void NXOpen.Spreadsheet.SetFormula ( int  row,
int  col,
NXOpen.SpreadsheetCellData  cellvalue,
int  sheet 
)

Stores a formula into a cell.

Created in NX11.0.0

License requirements: None.

Parameters
rowRow index of the cell
colColumn index of the cell
cellvalue
sheetSheet index of the cell (current worksheet, if zero is specified).
unsafe void NXOpen.Spreadsheet.SetNamedRange ( string  rangename,
int  row0,
int  col0,
int  row1,
int  col1,
int  sheet 
)

Defines a name for the Range of cells.

Created in NX11.0.0

License requirements: None.

Parameters
rangenameName to be given to the range
row0Starting row of the table, which is being named
col0Starting column of the table, which is being named
row1Row of the table, upto which the name will apply
col1Column of the table, upto which the name will apply
sheetSheet index of the table (current worksheet, if zero is specified).
unsafe void NXOpen.Spreadsheet.SetNumber ( int  row,
int  col,
NXOpen.SpreadsheetCellData  cellvalue,
int  sheet 
)

Stores a numeric value in the specified cell of the worksheet.

Created in NX11.0.0

License requirements: None.

Parameters
rowRow index of the cell
colColumn index of the cell
cellvalueNumeric value to be set in the cell.
sheetSheet index (current worksheet, if zero is specified).
unsafe void NXOpen.Spreadsheet.SetSheetNumber ( int  sheet)

Sets the worksheet with specified index as current worksheet

Created in NX11.0.0

License requirements: None.

Parameters
sheetThe number to which the current work sheet is to be set.
unsafe void NXOpen.Spreadsheet.SetString ( int  row,
int  col,
NXOpen.SpreadsheetCellData  cellvalue,
int  sheet 
)

Sets the string in the cell.

Created in NX11.0.0

License requirements: None.

Parameters
rowRow index of the cell.
colColumn index of the cell.
cellvalueString to be stored in this cell.
sheetSheet index (current worksheet, if zero is specified).
unsafe void NXOpen.Spreadsheet.Terminate ( )

Terminates excel sheet for opened part.

Created in NX11.0.0

License requirements: None.


The documentation for this class was generated from the following file:
Copyright 2017 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.