Related Topics
Excel Class
This object represents an Excel document object.
Methods


Returns a cell value from an Excel Spreadsheet. This is an overloaded method with the following possible declarations:
public static string GetValueByCell(bp BP, string ExcelPath, string CellName)
public static string GetValueByCell(bp BP, Stream ExcelStream, string CellName)
Parameters
bp: The BP Logix Object.
ExcelPath: The file system path string to the Excel file.
ExcelStream: The stream object containing the stream of the Excel file.
CellName: The string name of the cell location.
Returns
List: A string value from the cell.
Example
string ExcelValue = Excel.GetValuesByCell(bp, "C:\\FilePath", "R1C2");


Returns a List object containing cell values for a given number of rows in an Excel spreadsheet. This is an overloaded method with the following possible declarations:
public static List<string> GetValuesByCell(bp BP, string ExcelPath,
string CellName, int pRows)
public static List<string> GetValuesByCell(bp BP, Stream ExcelStream,
string CellName, int pRows)
Parameters
bp: The BP Logix Object.
ExcelPath: The file system path string to the Excel file.
ExcelStream: The stream object containing the stream of the Excel file.
CellName: The string name of the cell location.
pRows: The integer number of rows to return.
Returns
List: A list object containing the string values from the cell rows.
Example
// Return the values from four rows in the excel file.
List ExcelValues = Excel.GetValuesByCell(bp, "C:\\FilePath", "R1C2", 4);


Returns a List object containing cell values for a given number of rows in an Excel spreadsheet. This is an overloaded method with the following possible declarations:
public static string GetValueByRangeName(bp BP, string ExcelPath,
string RangeName)
public static string GetValueByRangeName(bp BP, Stream ExcelStream,
string RangeName)
Parameters
bp: The BP Logix Object.
ExcelPath: The file system path string to the Excel file.
ExcelStream: The stream object containing the stream of the Excel file.
RangeName: The named range from which to pull the value.
Returns
List: A list object containing the string values from the cell rows.
Example
string ExcelValue = Excel.GetValueByRangeName(bp, "C:\\FilePath",
"NamedRange");


Returns a List object containing cell values for a given row in an Excel spreadsheet.
Parameters
bp: The BP Logix Object.
Stream: The stream object containing the stream of the Excel file.
pRow: The integer row number from which to pull the values.
Returns
List: A list object containing the string values from the row.
Example
string ExcelValue = Excel.GetValuesByRow(bp, [StreamObject], [RowInteger]);
Documentation Feedback and Questions
If you notice some way that this document can be improved, we're happy to hear your suggestions. Similarly, if you can't find an answer you're looking for, ask it via feedback. Simply click on the button below to provide us with your feedback or ask a question. Please remember, though, that not every issue can be addressed through documentation. So, if you have a specific technical issue with Process Director, please open a support ticket.