ExcelDriver Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a wrapper around an instance of Excel that simplifies starting Excel and interacting with the component object model (COM) objects that represent items in Excel such as the application, workbook, and worksheets.
public class ExcelDriver : IDisposable
type ExcelDriver = class
interface IDisposable
Public Class ExcelDriver
Implements IDisposable
- Inheritance
-
ExcelDriver
- Implements
Constructors
ExcelDriver() |
Initializes a new instance of the ExcelDriver class without specifying the workbook or instance of Excel that the ExcelDriver object should use. |
ExcelDriver(Workbook) |
Initializes a new instance of the ExcelDriver class that uses the specified workbook and attaches to the associated Excel application. |
Properties
App |
Gets or sets a reference to the Application object that the ExcelDriver class uses for component object model (COM) interoperability with the running instance of Excel. |
ExcelProcess |
Gets the Process object that represents the process that is running Excel on the local computer. |
OpenReadOnly | |
Sheets |
Gets or sets the collection of worksheets in the currently open workbook. |
Workbook |
Gets the currently open Excel workbook. |
Workbooks |
Methods
Dispose() |
Releases all of the resources that the ExcelDriver object used. |
Finalize() | |
GetBashedPopups() |
Gets the PopupMessage objects that represent the message boxes that the pop-up blocker dismissed, and clears the internal list of messages. |
GetCellValue(String) |
Gets the values from one or more specified cells in the currently open workbook. |
LaunchExcelProcess() |
Starts a process running Excel and sets the App and ExcelProcess properties. |
OpenWorkbook(String, Boolean, String, String, Nullable<DateTime>) |
Opens the specified Excel workbook on the local computer if the date that the workbook was last saved matches the specified date, using the specified passwords if the workbook is protected or write-reserved. |
OpenWorkbook(String, Nullable<DateTime>) |
Opens the specified Excel workbook on the local computer if the date that the workbook was last saved matches the specified date. |
OpenWorkbook(String) |
Opens the specified Excel workbook on the local computer. |
RunMacro(String, Object[]) |
Runs the specified macro with the specified input on the currently open Excel workbook. |
SetCellValue(String, String) |
Sets the values in one or more specified cells in the currently open workbook. |