Method: OpenSpreadsheet for DataPlugin
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Methods > Method: OpenSpreadsheet for DataPlugin
Method: OpenSpreadsheet for DataPlugin
Uses a specified DataPlugin to open an Excel file. To create this DataPlugin use the file reader Only filename in the Configure DataPlugin dialog box.
The DataPlugin cannot access Excel files that are password protected.
Set oWorkbook = Object.OpenSpreadsheet(FileName, [SpreadsheetType])
| Object | DataPlugin Object with this method | ||||||||||||
| FileName | String Specifies the name of the Excel file to be saved with the filename extension and the path. | ||||||||||||
| [SpreadsheetType] | Specifies the Excel file type. If you do not specify this parameter, DIAdem uses the filename extension to specify the Excel file type. Enumeration with the following selection terms:
| ||||||||||||
| oWorkbook | Workbook Returned object |
The following example opens an Excel file and saves the author of the workbook as a root property:
Sub ReadStore(File) Dim oExcelFile Set oExcelFile = OpenSpreadsheet("C:\ExcelExample.xls") Call Root.Properties.Add("Author",oExcelFile.WorkbookInfo.Author) End Sub