File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11<#
22. SYNOPSIS
33 Converts all XLSX files in the script directory to pipe-delimited .txt files (Access-style),
4- according to column specifications/order read from a CSV file (typically produced by Export-SqlTableColumns_Version3 .ps1).
4+ according to column specifications/order read from a CSV file (typically produced by Export-SqlTableColumns .ps1).
55
66. DESCRIPTION
77 - All .xlsx files and the column properties file (.csv) must be in the same folder as the script.
@@ -39,7 +39,7 @@ Write-Host "Column property file found: $($PropertiesCsv.Name)"
3939# Load column configuration (FIXED DELIMITER ; as in export script)
4040Write-Host " Loading column configuration from CSV..."
4141$ColProps = Import-Csv - Path $PropertiesCsv.FullName - Delimiter ' ;'
42- $ColumnOrder = $ColProps | Select-Object - ExpandProperty NomeColonna
42+ $ColumnOrder = $ColProps | Select-Object - ExpandProperty ColumnName
4343Write-Host " Expected columns (order): $ ( $ColumnOrder -join ' , ' ) "
4444
4545# Check ImportExcel
Original file line number Diff line number Diff line change 1- # Connection parameters - will be prompted to the user
1+ # Export-SqlTableColumns.ps1
2+ # Exports SQL Server table column properties to a CSV.
3+
24Write-Host " === EXPORT SQL SERVER TABLE COLUMNS PROPERTIES ==="
35
4- $SqlServer = Read-Host " Enter SQL Server name (e.g.: localhost\SQLEXPRESS)"
6+ $SqlServer = Read-Host " Enter SQL Server name (e.g.: localhost\\ SQLEXPRESS)"
57if ([string ]::IsNullOrWhiteSpace($SqlServer )) {
68 Write-Error " SQL Server name is required."
79 exit 1
You can’t perform that action at this time.
0 commit comments