Namespace: Consultingwerk.Utilities.Excel
Class 
ExcelWorksheetImporter Copy to Clipboard
Parent classes:
Inherits: Consultingwerk.Utilities.Excel.ExcelUtility

File:ExcelWorksheetImporter
Purpose:Imports Excel Worksheets into Temp-Tables
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Sun Feb 26 12:21:30 CET 2012
Notes:Based on the Excel Com Interop Assembly
Microsoft.Office.Interop.Excel
Purpose: Raised when the import has finished
Notes:



Top Method Summary
Options Name Purpose
+ Microsoft.Office.Interop.Excel.Worksheet GetWorksheet (Workbook, character, integer) Returns the reference to the Worksheet referenced by either Name or Index
Inherited from Consultingwerk.Utilities.Excel.ExcelUtility
+ Import (ImportWorksheetArguments, table-handle) Imports from an Excel Worksheet into a Temp-Table
# ImportRows (Worksheet, ImportWorksheetArguments, table-handle) Imports rows from an Excel worksheet to a Progress temp-table
# OnCompleted (EventArgs) Raises the Completed event
# OnProgressChanged (EventArgs) Raises the ProgressChanged event
+ Microsoft.Office.Interop.Excel.Workbook OpenWorkbook (Application, character) Opens an Excel Workbook
# Microsoft.Office.Interop.Excel.Workbook OpenWorkbook (Application, character, logical) Opens an Excel Workbook
Inherited from Consultingwerk.Utilities.Excel.ExcelUtility

Top Constructor Summary
Options Name Purpose
+ ExcelWorksheetImporter () Constructor of the ExcelWorksheetImporter class

Top Event Summary
Options Name Purpose
+ Completed (Object, EventArgs) Raised when the import has finished
+ ProgressChanged (Object, EventArgs) Raised when the import has processed the RowsPerProgressEvent number of rows

Top Property Summary
Options Name Purpose
+ INTEGER RowsImported


Method Detail
Top

PUBLIC Microsoft.Office.Interop.Excel.Worksheet GetWorksheet (Workbook, character, integer)

Inherited from Consultingwerk.Utilities.Excel.ExcelUtility
Purpose: Returns the reference to the Worksheet referenced by either Name or
Index
Notes: The Worksheet name has preference over the index if set

Parameters:
poWorkbook Microsoft.Office.Interop.Excel.Workbook
The reference to the workbook that contains the Worksheet
pcWorksheetName CHARACTER
The name of the worksheet to return
piWorksheetIndex INTEGER
The index (number) of the worksheet to return
Returns Microsoft.Office.Interop.Excel.Worksheet
The reference to the Excel worksheet
Top

PUBLIC Import (ImportWorksheetArguments, table-handle)

Purpose: Imports from an Excel Worksheet into a Temp-Table
Notes:

Parameters:
poImportWorksheetArguments Consultingwerk.Utilities.Excel.ImportWorksheetArguments
A reference to an ImportWorksheetArguments instance with the parameters for this method
phTempTable TABLE-HANDLE
OUTPUT TABLE-HANDLE The temp-table to import to (note the schema for the temp-table is provided by the caller BY-REFERENCE)
Top

PROTECTED ImportRows (Worksheet, ImportWorksheetArguments, table-handle)

Purpose: Imports rows from an Excel worksheet to a Progress temp-table
Notes:

Parameters:
poWorksheet Microsoft.Office.Interop.Excel.Worksheet
The reference to the Excel Worksheet
poImportWorksheetArguments Consultingwerk.Utilities.Excel.ImportWorksheetArguments
A reference to an ImportWorksheetArguments instance with the parameters for this method
phTempTable TABLE-HANDLE
OUTPUT TABLE-HANDLE The temp-table to import to (note the schema for the temp-table is provided by the caller)
Top

PROTECTED OnCompleted (EventArgs)

Purpose: Raises the Completed event
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs instance for the event
Top

PROTECTED OnProgressChanged (EventArgs)

Purpose: Raises the ProgressChanged event
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs instance for the event
Top

PUBLIC Microsoft.Office.Interop.Excel.Workbook OpenWorkbook (Application, character)

Purpose: Opens an Excel Workbook
Notes:

Parameters:
poExcel Microsoft.Office.Interop.Excel.Application
The reference to an Excel Application instance
pcFileName CHARACTER
The file name of the Workbook to open
Returns Microsoft.Office.Interop.Excel.Workbook
The reference to the Workbook instance
Top

PROTECTED Microsoft.Office.Interop.Excel.Workbook OpenWorkbook (Application, character, logical)

Inherited from Consultingwerk.Utilities.Excel.ExcelUtility
Purpose: Opens an Excel Workbook
Notes:

Parameters:
poExcel Microsoft.Office.Interop.Excel.Application
The reference to an Excel Application instance
pcFileName CHARACTER
The file name of the Workbook to open
plReadOnly LOGICAL
Logical value indicating if the Workbook should be opened read only
Returns Microsoft.Office.Interop.Excel.Workbook
The reference to the Workbook instance


Constructor Detail
Top

PUBLIC ExcelWorksheetImporter ()

Purpose: Constructor of the ExcelWorksheetImporter class
Notes:



Event Detail
Top

PUBLIC Completed (Object, EventArgs)

Purpose: Raised when the import has finished
Notes:

Parameters:
sender Progress.Lang.Object
The instance the raised the event
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs instance for this event
Top

PUBLIC ProgressChanged (Object, EventArgs)

Purpose: Raised when the import has processed the RowsPerProgressEvent number
of rows
Notes:

Parameters:
sender Progress.Lang.Object
The instance the raised the event
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs instance for this event


Property Detail
Top

PUBLIC INTEGER RowsImported


Returns INTEGER


©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.12.2024 13:24:10