mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-23 11:43:53 +00:00
add to exported functions, formatting, fix typo.
This commit is contained in:
@@ -64,6 +64,7 @@ Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5
|
|||||||
'Import-USPS',
|
'Import-USPS',
|
||||||
'Invoke-AllTests',
|
'Invoke-AllTests',
|
||||||
'Invoke-Sum',
|
'Invoke-Sum',
|
||||||
|
'Invoke-ExcelQuery',
|
||||||
'Join-Worksheet',
|
'Join-Worksheet',
|
||||||
'LineChart',
|
'LineChart',
|
||||||
'Merge-MultipleSheets',
|
'Merge-MultipleSheets',
|
||||||
@@ -80,6 +81,7 @@ Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5
|
|||||||
'Pivot',
|
'Pivot',
|
||||||
'Read-Clipboard',
|
'Read-Clipboard',
|
||||||
'ReadClipboardImpl',
|
'ReadClipboardImpl',
|
||||||
|
'Read-OleDbData',
|
||||||
'Remove-Worksheet',
|
'Remove-Worksheet',
|
||||||
'Select-Worksheet',
|
'Select-Worksheet',
|
||||||
'Send-SQLDataToExcel',
|
'Send-SQLDataToExcel',
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ function Invoke-ExcelQuery {
|
|||||||
[String] $Query # var name consistent with Invoke-Sqlcmd
|
[String] $Query # var name consistent with Invoke-Sqlcmd
|
||||||
)
|
)
|
||||||
$FullName = (Get-ChildItem $Path).FullName
|
$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;'" `
|
-ConnectionString "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=$FullName;Extended Properties='Excel 12.0 Xml;HDR=NO;IMEX=1;'" `
|
||||||
-SqlStatement $Query
|
-SqlStatement $Query
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#Requires -Modules Pester
|
#Requires -Modules Pester
|
||||||
Import-Module $PSScriptRoot\..\..\ImportExcel.psd1 -Force
|
|
||||||
$scriptPath = $PSScriptRoot
|
$scriptPath = $PSScriptRoot
|
||||||
|
Import-Module $scriptPath\..\..\ImportExcel.psd1 -Force
|
||||||
$tfp = "$scriptPath\Read-OleDbData.xlsx"
|
$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
|
$ACEnotWorking = $false
|
||||||
|
$cs = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=$tfp;Extended Properties='Excel 12.0 Xml;HDR=NO;IMEX=1;'"
|
||||||
try {
|
try {
|
||||||
$Results = Read-OleDbData -ConnectionString $cs -SqlStatement "select 1"
|
$Results = Read-OleDbData -ConnectionString $cs -SqlStatement "select 1"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user