mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Minor tweak. Display query executed
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
|
||||
try { Import-Module $PSScriptRoot\..\..\ImportExcel.psd1 } catch { throw ; return }
|
||||
|
||||
$queries =
|
||||
'select * from [sheet1$A:A]',
|
||||
'select * from [sheet1$]',
|
||||
'select * from [sheet1$A2:E11]',
|
||||
'select F2,F5 from [sheet1$A2:E11]',
|
||||
'select * from [sheet1$A2:E11] where F2 = "Grocery"',
|
||||
'select F2 as [Category], F5 as [Discount], F5*2 as [DiscountPlus] from [sheet1$A2:E11]'
|
||||
'select * from [sheet1$A:A]',
|
||||
'select * from [sheet1$]',
|
||||
'select * from [sheet1$A2:E11]',
|
||||
'select F2,F5 from [sheet1$A2:E11]',
|
||||
'select * from [sheet1$A2:E11] where F2 = "Grocery"',
|
||||
'select F2 as [Category], F5 as [Discount], F5*2 as [DiscountPlus] from [sheet1$A2:E11]'
|
||||
|
||||
foreach ($query in $queries) {
|
||||
Invoke-ExcelQuery .\testOleDb.xlsx $query| Format-Table
|
||||
"query: $($query)"
|
||||
Invoke-ExcelQuery .\testOleDb.xlsx $query | Format-Table
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user