Revert "Suggesting modifications"

This reverts commit f21fe248fe.
This commit is contained in:
Doug Finke
2015-04-18 17:11:20 -04:00
parent f21fe248fe
commit 315ba5089a
4 changed files with 29 additions and 76 deletions

View File

@@ -43,47 +43,6 @@ function Import-Excel {
} }
} }
function Export-ExcelSheet {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[String]
$Path,
[String]
$OutputPath = '.\',
[String]
$SheetName,
[string]
$Encoding = 'UTF8',
[string]
$Extension = '.txt',
[string]
$Delimiter = ';'
)
$Path = (Resolve-Path $Path).Path
$xl = New-Object -TypeName OfficeOpenXml.ExcelPackage -ArgumentList $Path
$workbook = $xl.Workbook
$targetSheets = $workbook.Worksheets | Where {$_.Name -Match $SheetName}
$params = @{} + $PSBoundParameters
$params.Remove("OutputPath")
$params.Remove("SheetName")
$params.NoTypeInformation = $true
Foreach ($sheet in $targetSheets)
{
Write-Verbose "Exporting sheet: $($sheet.Name)"
$params.Path = "$($OutputPath)\$($Sheet.Name)$($Extension)"
Import-Excel $Path -Sheet $($sheet.Name) | Export-Csv @params
}
}
function Import-ExcelAllSheet function Import-ExcelAllSheet
{ {
[CmdletBinding()] [CmdletBinding()]

Binary file not shown.

View File

@@ -1,3 +0,0 @@
"sheet10"
""
"sheet10"

View File

@@ -1,3 +0,0 @@
"sheet20"
""
"sheet20"