IBuiltInFunctions.ExecuteDisplayExcelList Method
Parameters
- excelFileName
- string
The full path to the Excel file to be displayed.
- excelWindowName
- string
The title of the displayed window with the Excel file.
- workbookToRefresh
- IWorkbook
The workbook that will be refreshed (re-calculated) after the operation has finished. Cannot be null reference (Nothing in Visual Basic). This is usually the overhead workbook, which can be retrieved with IOverhead.GetWorkbook method.
Each column in the Excel file represent one global variable to be imported. The first row contains the column list level, which may be 1 or 2. The sheet typically contains a customers' book with a list (level 1) and possibly a sub-list (level 2). The row 2 contains the names of the variables to be written to. The row 3 is just for the display purposes with desired headers and colors. The other rows contain the data.
After the variables are imported, the current ActiveWorkbookSet is re-calculated as it may contain references to the modified global variables.
The following example will call the "Display Excel List" function on the overhead workbook.
// Execute the function on the overhead workbook. try { // Get the overhead workbook. The lock is required. es.CurrentVersion.Overhead.GetLockOnWorkbook(); var wbook = es.CurrentVersion.Overhead.GetWorkbook(); // Call the "Display Excel List" function which will write the data to global variables. es.BuiltInFunctions.ExecuteDisplayExcelList(@"C:\program files\QDV 7\Samples\Stuff_4_Macros\List Of Companies.xlsx", "List of Customers", wbook); } finally { // Release the lock on the overhead workbook in any case. es.CurrentVersion.Overhead.ReleaseLockOnWorkbook(); }
This language is not supported or no code example is available.