NXOpen .NET Reference Guide
|
Represents a class for interacting with spreadsheets. More...
Public Types | |
enum | LookupMode { Exact, Higher, Lower, Closest } |
Modes of lookup in the table. More... | |
enum | OpenMode { Read, Write } |
Sheet types to open spreadsheet. More... | |
enum | Sheettype { Gateway, Modeling, Partfamily } |
Sheet types to open spreadsheet. More... | |
Public Member Functions | |
unsafe NXOpen.SpreadsheetCellData | CreateCellData () |
Creates SpreadsheetCellData object. More... | |
unsafe string | ExportFile (string partnum) |
In NX/MGR mode, export an Excel spreadsheet file from the dataset file stored in the Teamcenter database to the native file system. More... | |
unsafe NXOpen.SpreadsheetCellData | HorizontalLookup (string file, string target, string range, int offset, NXOpen.SpreadsheetManager.LookupMode mode) |
Reads the value from a given spreadsheet using a horizontal table lookup. More... | |
unsafe NXOpen.Spreadsheet | Open (NXOpen.SpreadsheetManager.Sheettype sheettype, string partfile) |
Opens excel sheet associated with given part file. More... | |
unsafe NXOpen.SpreadsheetExternal | OpenFile (string sheet, NXOpen.SpreadsheetManager.OpenMode mode) |
Opens an Excel spreadsheet file. More... | |
unsafe NXOpen.SpreadsheetCellData | ReadAny (string filename, string cell) |
Reads value in a given cell, from a given spreadsheet. More... | |
unsafe NXOpen.SpreadsheetCellData | ReadCell (string filename, string cell) |
Reads value in a given cell, from a given spreadsheet. More... | |
unsafe NXOpen.SpreadsheetCellData | VerticalLookup (string file, string target, string range, int offset, NXOpen.SpreadsheetManager.LookupMode mode) |
Reads the value from a given spreadsheet using a vertical table lookup. More... | |
Public Member Functions inherited from NXOpen.Utilities.NXRemotableObject | |
IMessageCtrl | AsyncProcessMessage (IMessage msg, IMessageSink replySink) |
Asynchronously processes the given message. More... | |
IMessage | SyncProcessMessage (IMessage msg) |
Synchronously processes the given message. More... | |
Properties | |
Tag | Tag [get] |
Returns the tag of this object. More... | |
Properties inherited from NXOpen.Utilities.NXRemotableObject | |
IMessageSink | NextSink [get] |
Gets the next message sink in the sink chain. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from NXOpen.Utilities.NXRemotableObject | |
void | initialize () |
<exclude> More... | |
Represents a class for interacting with spreadsheets.
There are different types of methods to use the APIs from this class.
For interacting with the spreadsheet associated with a part file, use Spreadsheet object returned by NXOpen.SpreadsheetManager.Open For interacting with external spreadsheet, use Spreadsheet object returned by NXOpen.SpreadsheetManager.OpenFile .
To obtain an instance of this class, refer to NXOpen.Session
Usable only on Windows
Created in NX11.0.0
|
inline |
Creates SpreadsheetCellData object.
Created in NX11.0.0
License requirements: None.
|
inline |
In NX/MGR mode, export an Excel spreadsheet file from the dataset file stored in the Teamcenter database to the native file system.
The file is exported for readnig only.
Note: For dataset file stored in the Teamcenter database, the spreadsheet must be stored as a MSExcel or MSExcelX dataset. The dataset shall be attached to its containing item revision with an IMAN_specification relation. Up to one MSExcel or MSExcelX dataset can be attached.
Created in NX11.0.0
License requirements: None.
partnum | A part number containing a MsExcel dataset. |
If the file is exported successfully, the function returns a string indicating the full file name in native file system. If the file failed to export, the function returns empty string indicating no native file available.
In Native mode, it does nothing and always returns an empty string.
|
inline |
Reads the value from a given spreadsheet using a horizontal table lookup.
The Excel spreadsheet to be opened could be either from the native file system, or from the dataset file stored in the Teamcenter database.
Note: The mode works when the target cell contains only numeric values and the mode is ignored when the target cell contains text
Created in NX11.0.0
License requirements: None.
file | File name with full path |
target | Lookup target |
range | Table range |
offset | The offset to the data cell. |
mode | The mode of lookup in the table. |
|
inline |
Opens excel sheet associated with given part file.
And returns a Spreadsheet object.
Created in NX11.0.0
License requirements: None.
sheettype | Sheet type |
partfile | Part file |
|
inline |
Opens an Excel spreadsheet file.
The type of the access mode can be either Read, or Write. The Excel spreadsheet to be opened could be either from the native file system, or from the dataset file stored in the Teamcenter database.
Note: For dataset file stored in the Teamcenter database, the spreadsheet must be stored as a MSExcel or MSExcelX dataset. The dataset shall be attached to its containing item revision with an IMAN_specification relation. Up to one MSExcel or MSExcelX dataset can be attached.
Created in NX11.0.0
License requirements: None.
sheet | An external Excel file name |
mode | Mode read/write |
|
inline |
Reads value in a given cell, from a given spreadsheet.
The Excel spreadsheet to be opened could be either from the native file system, or from the dataset file stored in the Teamcenter database.
Created in NX11.0.0
License requirements: None.
filename | File name with full path |
cell | Cell number can contain the worksheet along with the cell number by separating the two fields with an exclamation mark. For example: Sheet1!A1 |
|
inline |
Reads value in a given cell, from a given spreadsheet.
The Excel spreadsheet to be opened could be either from the native file system, or from the dataset file stored in the Teamcenter database.
Created in NX11.0.0
License requirements: None.
filename | File name with full path |
cell | Cell number can contain the worksheet along with the cell number by separating the two fields with an exclamation mark. For example: Sheet1!A1 |
|
inline |
Reads the value from a given spreadsheet using a vertical table lookup.
The Excel spreadsheet to be opened could be either from the native file system, or from the dataset file stored in the Teamcenter database.
Note: The mode works when the target cell contains only numeric values and the mode is ignored when the target cell contains text
Created in NX11.0.0
License requirements: None.
file | File name with full path |
target | Lookup target |
range | Table range |
offset | The offset to the data cell. |
mode | The mode of lookup in the table. |
|
get |
Returns the tag of this object.