NX Open C++ Reference Guide
|
Represents a class for internal spreadsheet. More...
Public Member Functions | |
void | Clear () |
Clears the contents of the current worksheet. More... | |
void | Delete (int start1, int end1, int sheet, int operation) |
Deletes (clears) one or more rows/columns of data from a worksheet. More... | |
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... | |
void | 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. More... | |
NXOpen::SpreadsheetCellData * | EvaluateCell (int row, int col, int sheet) |
Returns the evaluated value of a cell. More... | |
NXOpen::SpreadsheetCellData * | GetFormula (int row, int col, int sheet) |
Retrieves a formula from a cell. More... | |
void | GetNamedRange (const NXString &rangename, std::vector< 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... | |
void | GetNamedRange (const char *rangename, std::vector< 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... | |
NXOpen::SpreadsheetCellData * | GetNumber (int row, int col, int sheet) |
Retrieves a numeric value from a cell. More... | |
int | GetNumberOfSheets () |
Returns the total number of sheets in the spreadsheet. More... | |
void | GetSheetNames (std::vector< NXString > &sheetnames) |
Returns list of existing sheet names in the spreadsheet. More... | |
int | GetSheetNumber () |
Returns the current work sheet number of the spreadsheet. More... | |
int | GetSheetNumberOfName (const NXString &sheetname) |
Returns sheet number of the sheet with given name. More... | |
int | GetSheetNumberOfName (const char *sheetname) |
Returns sheet number of the sheet with given name. More... | |
NXOpen::SpreadsheetCellData * | GetString (int row, int col, int sheet) |
Returns the String in the cell. More... | |
NXOpen::SpreadsheetCellData * | GetValue (int row, int col, int sheet) |
Returns a number, string or formula depending on the contents of the cell. More... | |
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... | |
void | Recalculate () |
Recalculates the spreadsheet. More... | |
void | Save () |
Saves the spreadsheet in the part file. More... | |
void | SetFormula (int row, int col, NXOpen::SpreadsheetCellData *cellvalue, int sheet) |
Stores a formula into a cell. More... | |
void | SetNamedRange (const NXString &rangename, int row0, int col0, int row1, int col1, int sheet) |
Defines a name for the Range of cells. More... | |
void | SetNamedRange (const char *rangename, int row0, int col0, int row1, int col1, int sheet) |
Defines a name for the Range of cells. More... | |
void | SetNumber (int row, int col, NXOpen::SpreadsheetCellData *cellvalue, int sheet) |
Stores a numeric value in the specified cell of the worksheet. More... | |
void | SetSheetNumber (int sheet) |
Sets the worksheet with specified index as current worksheet Created in NX11.0.0. More... | |
void | SetString (int row, int col, NXOpen::SpreadsheetCellData *cellvalue, int sheet) |
Sets the string in the cell. More... | |
void | Terminate () |
Terminates excel sheet for opened part. More... | |
virtual | ~Spreadsheet () |
Free resources associated with the instance. More... | |
Public Member Functions inherited from NXOpen::TransientObject | |
void * | GetHandle () |
Handle of the internal object represented by this object. More... | |
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.
|
virtual |
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
void NXOpen::Spreadsheet::Clear | ( | ) |
Clears the contents of the current worksheet.
Created in NX11.0.0.
License requirements : None
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
start1 | From where the deletion should start |
end1 | Upto where the rows should be deleted |
sheet | The sheet in which deletion should take place.(Current sheet, if no sheet is specified) |
operation | 1 for row deletion and 2 for column deletion. |
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
sheet | Sheet Number, starting from which sheets are to be deleted. |
count | Number of sheets to be deleted |
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
row0 | Starting row for range |
col0 | Starting column for range |
row1 | Ending row for range |
col1 | Ending column for range |
sheet0 | Sheet number for start of the range |
sheet1 | Sheet number for end of the range |
NXOpen::SpreadsheetCellData* NXOpen::Spreadsheet::EvaluateCell | ( | int | row, |
int | col, | ||
int | sheet | ||
) |
Returns the evaluated value of a cell.
row | Row index of the cell |
col | Column index of the cell |
sheet | Sheet index (current worksheet, if zero is specified). |
NXOpen::SpreadsheetCellData* NXOpen::Spreadsheet::GetFormula | ( | int | row, |
int | col, | ||
int | sheet | ||
) |
Retrieves a formula from a cell.
row | Row index of the cell |
col | Column index of the cell |
sheet | Sheet index (current worksheet, if zero is specified) |
void NXOpen::Spreadsheet::GetNamedRange | ( | const NXString & | rangename, |
std::vector< 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
rangename | Range name |
namedrange | The range of cells for given range name |
void NXOpen::Spreadsheet::GetNamedRange | ( | const char * | rangename, |
std::vector< 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
rangename | Range name |
namedrange | The range of cells for given range name |
NXOpen::SpreadsheetCellData* NXOpen::Spreadsheet::GetNumber | ( | int | row, |
int | col, | ||
int | sheet | ||
) |
Retrieves a numeric value from a cell.
row | Row index of the cell |
col | Column index of the cell |
sheet | Sheet index (current worksheet, if zero is specified) |
int NXOpen::Spreadsheet::GetNumberOfSheets | ( | ) |
Returns the total number of sheets in the spreadsheet.
void NXOpen::Spreadsheet::GetSheetNames | ( | std::vector< NXString > & | sheetnames | ) |
Returns list of existing sheet names in the spreadsheet.
Created in NX11.0.0.
License requirements : None
sheetnames | List of sheet names from specified spreadsheet |
int NXOpen::Spreadsheet::GetSheetNumber | ( | ) |
Returns the current work sheet number of the spreadsheet.
int NXOpen::Spreadsheet::GetSheetNumberOfName | ( | const NXString & | sheetname | ) |
Returns sheet number of the sheet with given name.
sheetname | Sheet name |
int NXOpen::Spreadsheet::GetSheetNumberOfName | ( | const char * | sheetname | ) |
Returns sheet number of the sheet with given name.
sheetname | Sheet name |
NXOpen::SpreadsheetCellData* NXOpen::Spreadsheet::GetString | ( | int | row, |
int | col, | ||
int | sheet | ||
) |
Returns the String in the cell.
row | Row index of the cell |
col | Column index of the cell |
sheet | Sheet index of the cell (current worksheet, if zero is specified). |
NXOpen::SpreadsheetCellData* NXOpen::Spreadsheet::GetValue | ( | int | row, |
int | col, | ||
int | sheet | ||
) |
Returns a number, string or formula depending on the contents of the cell.
row | Row index of the cell |
col | Column index of the cell |
sheet | Sheet index of the cell (current worksheet, if zero is specified). |
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
sheet | Sheet number, before which the sheets are to be inserted. |
count | Number of sheets to be inserted. |
void NXOpen::Spreadsheet::Recalculate | ( | ) |
Recalculates the spreadsheet.
Created in NX11.0.0.
License requirements : None
void NXOpen::Spreadsheet::Save | ( | ) |
Saves the spreadsheet in the part file.
Created in NX11.0.0.
License requirements : None
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
row | Row index of the cell |
col | Column index of the cell |
cellvalue | cellvalue |
sheet | Sheet index of the cell (current worksheet, if zero is specified). |
void NXOpen::Spreadsheet::SetNamedRange | ( | const NXString & | 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
rangename | Name to be given to the range |
row0 | Starting row of the table, which is being named |
col0 | Starting column of the table, which is being named |
row1 | Row of the table, upto which the name will apply |
col1 | Column of the table, upto which the name will apply |
sheet | Sheet index of the table (current worksheet, if zero is specified). |
void NXOpen::Spreadsheet::SetNamedRange | ( | const char * | 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
rangename | Name to be given to the range |
row0 | Starting row of the table, which is being named |
col0 | Starting column of the table, which is being named |
row1 | Row of the table, upto which the name will apply |
col1 | Column of the table, upto which the name will apply |
sheet | Sheet index of the table (current worksheet, if zero is specified). |
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
row | Row index of the cell |
col | Column index of the cell |
cellvalue | Numeric value to be set in the cell. |
sheet | Sheet index (current worksheet, if zero is specified). |
void NXOpen::Spreadsheet::SetSheetNumber | ( | int | sheet | ) |
Sets the worksheet with specified index as current worksheet
Created in NX11.0.0.
License requirements : None
sheet | The number to which the current work sheet is to be set. |
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
row | Row index of the cell. |
col | Column index of the cell. |
cellvalue | String to be stored in this cell. |
sheet | Sheet index (current worksheet, if zero is specified). |
void NXOpen::Spreadsheet::Terminate | ( | ) |
Terminates excel sheet for opened part.
Created in NX11.0.0.
License requirements : None