-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsonFiles.ps1
More file actions
20 lines (13 loc) · 826 Bytes
/
Copy pathjsonFiles.ps1
File metadata and controls
20 lines (13 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import-module importexcel
$Sheets = Get-ExcelSheetInfo -Path C:\T\INS_2019\Installation\Data\AddInConfiguration.xlsx
foreach($sheet in $Sheets)
{
$res = import-excel -Path C:\T\INS_2019\Installation\Data\AddInConfiguration.xlsx -WorksheetName $sheet.Name
$res | ConvertTo-Json | Tee-Object -FilePath "C:\T\INS_2019\Installation\Data\$($sheet.Name).json"
ConvertFrom-ExcelToSQLInsert -Path C:\T\INS_2019\Installation\Data\AddInConfiguration.xlsx -WorksheetName $sheet.Name -TableName hello -StartRow 2
}
$foo = Get-Content -Raw -Path "C:\T\INS_2019\Installation\Data\RAC_ADD_IN.json" | ConvertFrom-Json
$foo = Get-Content -Raw -Path "C:\T\INS_2019\Installation\Data\RAC_CONNECTIONS.json" | ConvertFrom-Json
$foo | get-member -MemberType NoteProperty
$foo.GetType() -eq [Object[]]
$foo -is [object[]]