Description: This method allows for the deletion of specified rows or columns from a specified worksheet.
Parameters:
DeleteRowsOrColumns(sPathOriginal As String, sPathTarget As String, sSheet As String, sRowsColsToDelete As String, bDoColumns As Boolean) As Long
|
Parameter |
Meaning |
|
SPathOriginal |
Excel file from which to delete sheet(s). |
|
SPathTarget |
Can be same as sPathOriginal, otherwise a new workbook is created containing only the remaining sheets, leaving sPathOriginal unchanged. |
|
sSheet |
Worksheet (name or number) to remove columns/rows from. |
|
sRowsColsToDelete |
Rows or columns to delete, specified by numbers, or ranges seperated by comma's. For example "1,4,9-12" would specify to remove the columns/rows 1, 4, 9, 10, 11, and 12. |
|
bDoColumns |
Set to TRUE to delete columns, otherwise, rows will be deleted. |
Return Values:
0: Success
-3: Unable to create Excel Application. Is it installed?
-4: Unable to destroy Excel Application.
-200: Excel reported an error
-201: Shareware Expired
-208: Target Path folder does not exist, even after attempting to create it.
-213: Invalid or missing sheets specified