add to exported functions, formatting, fix typo.

This commit is contained in:
Roy Ashbrook
2021-11-04 20:54:51 -04:00
parent 85f2433ffc
commit 7a8bbb9771
3 changed files with 5 additions and 3 deletions

View File

@@ -64,6 +64,7 @@ Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5
'Import-USPS',
'Invoke-AllTests',
'Invoke-Sum',
'Invoke-ExcelQuery',
'Join-Worksheet',
'LineChart',
'Merge-MultipleSheets',
@@ -80,6 +81,7 @@ Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5
'Pivot',
'Read-Clipboard',
'ReadClipboardImpl',
'Read-OleDbData',
'Remove-Worksheet',
'Select-Worksheet',
'Send-SQLDataToExcel',

View File

@@ -41,7 +41,7 @@ function Invoke-ExcelQuery {
[String] $Query # var name consistent with Invoke-Sqlcmd
)
$FullName = (Get-ChildItem $Path).FullName
Invoke-ExcelQuery `
Read-OleDbData `
-ConnectionString "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=$FullName;Extended Properties='Excel 12.0 Xml;HDR=NO;IMEX=1;'" `
-SqlStatement $Query
}

View File

@@ -1,9 +1,9 @@
#Requires -Modules Pester
Import-Module $PSScriptRoot\..\..\ImportExcel.psd1 -Force
$scriptPath = $PSScriptRoot
Import-Module $scriptPath\..\..\ImportExcel.psd1 -Force
$tfp = "$scriptPath\Read-OleDbData.xlsx"
$cs = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=$tfp;Extended Properties='Excel 12.0 Xml;HDR=NO;IMEX=1;'"
$ACEnotWorking = $false
$cs = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=$tfp;Extended Properties='Excel 12.0 Xml;HDR=NO;IMEX=1;'"
try {
$Results = Read-OleDbData -ConnectionString $cs -SqlStatement "select 1"
}