NXOpen .NET Reference Guide
1899
|
Represents a class for external spreadsheet. More...
Public Member Functions | |
unsafe int | AddWorksheet (string sheetname) |
Add worksheet in excel. More... | |
unsafe void | AppendRow (int worksheet, NXOpen.SpreadsheetCellData[] data) |
Appends a new row of data to the Excel file. More... | |
unsafe void | AutofitColumns (int worksheet, int colstart, int colend) |
Autofits columns in excel. More... | |
unsafe void | CloseFile (bool save) |
Closes an excel file with an option to save the file before close. More... | |
unsafe void | DeleteColumn (int worksheet, int columnnumber) |
Delete column. More... | |
unsafe void | DeleteRange (int worksheet, int columnstart, int columnend, int rowstart, int rowend) |
Delete cell range. More... | |
unsafe void | DeleteRow (int worksheet, int rownumber) |
Delete row. More... | |
unsafe int | GetNumberofsheets () |
GetWorkSheetCount in excel. More... | |
unsafe int | GetWorksheetIndex (string sheetname) |
Returns worksheet ID. More... | |
unsafe void | GetWorksheetNames (out string[] sheetnames) |
Returns list of existing worksheet names in the spreadsheet. More... | |
unsafe void | InsertImage (int worksheet, int rowstart, int colstart, int rowend, int colend, string imagepath) |
Inserts image in specified range of the spreadsheet. More... | |
unsafe void | MergeCellRange (int worksheet, int rowstart, int colstart, int rowend, int colend) |
Merges cells to the specified range of the spreadsheet. More... | |
unsafe void | ReadNamedRange (int worksheet, string rangename, out NXOpen.SpreadsheetCellData[] v2) |
Reads a named range. More... | |
unsafe void | ReadRange (int worksheet, int rowstart, int colstart, int rowend, int colend, out NXOpen.SpreadsheetCellData[] v2) |
Reads the spreadsheet file row wise and returns the data in the specified ranges of the cells. More... | |
unsafe void | ReadSpreadsheetRange (int worksheet, int rowstart, int colstart, int rowend, int colend, out NXOpen.SpreadsheetCellData[] v2) |
Reads the spreadsheet file row wise and returns the data in the specified ranges of the cells. More... | |
unsafe void | SaveAs (int worksheet, string fileName, NXOpen.ExcelFileFormatT fileFormat) |
Saves excel file. More... | |
unsafe void | SetRangeAlignment (int worksheet, int rowstart, int colstart, int rowend, int colend, NXOpen.AlignmentStyleT alignStyle, NXOpen.TextAlignmentModeT alignMode) |
Sets range alignment. More... | |
unsafe void | SetRangeBackgroundColor (int worksheet, int rowstart, int colstart, int rowend, int colend, double[] cellBackgroundColor) |
Sets the background color to the specified range of the spreadsheet. More... | |
unsafe void | SetRangeBordersProperty (int worksheet, int rowstart, int colstart, int rowend, int colend, double[] cellBorderColor, NXOpen.BorderLineStyleT borderLineStyle) |
Sets the borders property to the specified range of the spreadsheet. More... | |
unsafe void | SetRangeFontProperty (int worksheet, int rowstart, int colstart, int rowend, int colend, string fontName, int fontSize, double[] cellFontColor, bool bold, bool italic, NXOpen.UnderlineStyleT underline, bool strikethrough, bool superscript, bool subscript) |
Sets the font property to the specified range of the spreadsheet. More... | |
unsafe void | SetSheetTabBackgroundColor (int worksheet, double[] tabBackgroundColor) |
Sets the background color to the specified worksheet tab of the spreadsheet. More... | |
unsafe void | SetWorksheetName (int worksheet, string sheetname) |
Add worksheet name in spreadsheet. More... | |
unsafe void | WriteRange (NXOpen.SpreadsheetCellData[] data) |
Writes the data to the specified range of the spreadsheet. More... | |
unsafe void | WriteSpreadsheetRange (int worksheet, int rowstart, int colstart, int rowend, int colend, NXOpen.SpreadsheetCellData[] data) |
Writes the data to the specified range of the spreadsheet. More... | |
Public Member Functions inherited from NXOpen.TransientObject | |
void | Dispose () |
Frees the object from memory. More... | |
void | PrintTestData (String variableName) |
<exclude> More... | |
void | PrintTestData (String variableName, int lineNumber) |
<exclude> More... | |
new string | ToString () |
Returns a String that represents the current Object. 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... | |
Protected Member Functions | |
override void | FreeResource () |
Free resources associated with the instance. More... | |
Additional Inherited Members | |
Properties inherited from NXOpen.TransientObject | |
IntPtr | Handle [get] |
Handle of the internal object represented by this object. More... | |
Represents a class for external spreadsheet.
To call functions from this class, use SpreadsheetExternal object returned by NXOpen.SpreadsheetManager.OpenFile .
Usable only on Windows
Created in NX11.0.0
|
inline |
Add worksheet in excel.
Created in NX1847.0.0
License requirements: None.
sheetname | Sheet name to be set |
|
inline |
Appends a new row of data to the Excel file.
Created in NX11.0.0
License requirements: None.
worksheet | Worksheet ID |
data | The append data list. |
|
inline |
Autofits columns in excel.
Created in NX1847.0.0
License requirements: None.
worksheet | Worksheet ID |
colstart | Starting column |
colend | Ending column |
|
inline |
Closes an excel file with an option to save the file before close.
Created in NX11.0.0
License requirements: None.
save | If true, the file will be saved. If false, the file will not be saved. |
|
inline |
Delete column.
Created in NX1899.0.0
License requirements: None.
worksheet | Worksheet ID |
columnnumber | Column to be deleted |
|
inline |
Delete cell range.
Created in NX1899.0.0
License requirements: None.
worksheet | Worksheet ID |
columnstart | Column start to delete from |
columnend | Column end to delete upto |
rowstart | Row start to delete from |
rowend | Row end to delete upto |
|
inline |
Delete row.
Created in NX1899.0.0
License requirements: None.
worksheet | Worksheet ID |
rownumber | Row to be deleted |
|
inlineprotectedvirtual |
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.
Implements NXOpen.TransientObject.
|
inline |
GetWorkSheetCount in excel.
Created in NX1847.0.0
License requirements: None.
|
inline |
Returns worksheet ID.
Created in NX11.0.0
License requirements: None.
sheetname | Sheet name to get Index |
|
inline |
Returns list of existing worksheet names in the spreadsheet.
Created in NX1899.0.0
License requirements: None.
sheetnames | List of worksheet names from specified spreadsheet |
|
inline |
Inserts image in specified range of the spreadsheet.
Created in NX1847.0.0
License requirements: None.
worksheet | Worksheet ID |
rowstart | Starting row of the range |
colstart | Starting column of the range |
rowend | Ending row of the range |
colend | Ending column of the range |
imagepath | Image path to be inserted |
|
inline |
Merges cells to the specified range of the spreadsheet.
Created in NX1847.0.0
License requirements: None.
worksheet | Worksheet ID |
rowstart | Starting row of the range |
colstart | Starting column of the range |
rowend | Ending row of the range |
colend | Ending column of the range |
|
inline |
Reads a named range.
Created in NX11.0.0
License requirements: None.
worksheet | worksheet ID |
rangename | Range name |
v2 | Data list for given range name |
|
inline |
Reads the spreadsheet file row wise and returns the data in the specified ranges of the cells.
The first five indices of the returned data list has integer values of worksheet, rowstart, colstart and colend. The actual data, if any, is stored from the sixth index in the data list and all the values are of string type. The row and column of the worksheet starts with index 1.
Created in NX11.0.0
License requirements: None.
worksheet | Worksheet ID |
rowstart | Starting row of the range |
colstart | Starting column of the range |
rowend | Ending row of the range |
colend | Ending column of the range |
v2 | Data list for given range |
|
inline |
Reads the spreadsheet file row wise and returns the data in the specified ranges of the cells.
This is different from NXOpen.SpreadsheetExternal.ReadRange as the first value in the list contains the actual data and maintains the type information of values in the returned data list. The row and column of the worksheet starts with index 1.
Created in NX1899.0.0
License requirements: None.
worksheet | Worksheet ID |
rowstart | Starting row of the range |
colstart | Starting column of the range |
rowend | Ending row of the range |
colend | Ending column of the range |
v2 | Data list for given range |
|
inline |
Saves excel file.
Created in NX1847.0.0
License requirements: None.
worksheet | Worksheet ID |
fileName | File name to be set |
fileFormat | File format to be set |
|
inline |
Sets range alignment.
Created in NX1847.0.0
License requirements: None.
worksheet | Worksheet ID |
rowstart | Starting row of the range |
colstart | Starting column of the range |
rowend | Ending row of the range |
colend | Ending column of the range |
alignStyle | Align Style |
alignMode | Align Mode |
|
inline |
Sets the background color to the specified range of the spreadsheet.
Created in NX1847.0.0
License requirements: None.
worksheet | Worksheet ID |
rowstart | Starting row of the range |
colstart | Starting column of the range |
rowend | Ending row of the range |
colend | Ending column of the range |
cellBackgroundColor | Array of 3 RGB values |
|
inline |
Sets the borders property to the specified range of the spreadsheet.
Created in NX1847.0.0
License requirements: None.
worksheet | Worksheet ID |
rowstart | Starting row of the range |
colstart | Starting column of the range |
rowend | Ending row of the range |
colend | Ending column of the range |
cellBorderColor | Array of 3 RGB values |
borderLineStyle | Border line style |
|
inline |
Sets the font property to the specified range of the spreadsheet.
Created in NX1847.0.0
License requirements: None.
worksheet | Worksheet ID |
rowstart | Starting row of the range |
colstart | Starting column of the range |
rowend | Ending row of the range |
colend | Ending column of the range |
fontName | Sheet name to be set |
fontSize | font size |
cellFontColor | Array of 3 RGB values |
bold | If true, the letters will be bold. |
italic | If true, the letters will be bItalic. |
underline | underline |
strikethrough | If true, the letters will be bStrikethrough. |
superscript | If true, the letters will be bSuperscript. |
subscript | If true, the letters will be bSubscript. |
|
inline |
Sets the background color to the specified worksheet tab of the spreadsheet.
Created in NX1847.0.0
License requirements: None.
worksheet | Worksheet ID |
tabBackgroundColor | Array of 3 RGB values |
|
inline |
Add worksheet name in spreadsheet.
Created in NX1847.0.0
License requirements: None.
worksheet | Worksheet ID |
sheetname | Sheet name to be set |
|
inline |
Writes the data to the specified range of the spreadsheet.
The first five values of the data list are integers contaning range information such as the worksheet ID, starting row of the range, starting column of the range, ending row of the range and ending column of the range. The row and column of the worksheet starts with index 1.
Created in NX11.0.0
License requirements: None.
data | The data list to be written to external Excel worksheet. |
|
inline |
Writes the data to the specified range of the spreadsheet.
This is different from NXOpen.SpreadsheetExternal.WriteRange as the range information need not be passed in the data list. The row and column of the worksheet starts with index 1.
Created in NX1899.0.0
License requirements: None.
worksheet | Worksheet ID |
rowstart | Starting row of the range |
colstart | Starting column of the range |
rowend | Ending row of the range |
colend | Ending column of the range |
data | The data list to be written to external Excel worksheet. |