You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like what the cmdlet does, I just would like a Parameter that would allow me to select specific Columns from the spreadsheet to import into SQL data table. To use the example to illustrate;
| File: Movies.xlsx - Sheet: Sheet1 |
| A B C |
|1 Movie Name Year Rating |
|2 The Bodyguard 1992 9 |
|3 The Matrix 1999 8 |
|4 Skyfall 2012 9 |
|5 The Avengers 2012 |
I want to be able to select column A and B, but not get C on the import.
The text was updated successfully, but these errors were encountered:
@dfinke It looks like the parameters on ConvertFrom-ExcelData and ConvertFrom-ExcelToSQLInsert are outdated.
This should do what @TerryGriner want:
ConvertFrom-ExcelToSQLInsert-Path Book1.xlsx -TableName Test -HeaderName 'A','B'
But on ConvertFrom-ExcelData and ConvertFrom-ExcelToSQLInsert the parameter name is -Header instead of -HeaderName like in Import-Excel so you get an error.
Maybe it will be best to set DynamicParam on ConvertFrom-ExcelData and ConvertFrom-ExcelToSQLInsert from Import-Excel like @jhoneill did in Send-SQLDataToExcel in the last update so it will be updated automatically.
Also if you want 'A' and 'C' instead of 'A', 'B' you can't do it with -HeaderName but with something like what I proposed in here #579 you can select any column you want with -HeaderName
I like what the cmdlet does, I just would like a Parameter that would allow me to select specific Columns from the spreadsheet to import into SQL data table. To use the example to illustrate;
| File: Movies.xlsx - Sheet: Sheet1 |
| A B C |
|1 Movie Name Year Rating |
|2 The Bodyguard 1992 9 |
|3 The Matrix 1999 8 |
|4 Skyfall 2012 9 |
|5 The Avengers 2012 |
I want to be able to select column A and B, but not get C on the import.
The text was updated successfully, but these errors were encountered: