Replies: 2 comments 4 replies
-
$data = ConvertFrom-Csv @"
Region,State,Units,Price
West,Texas,927,923.71
North,Tennessee,466,770.67
East,Florida,520,458.68
East,Maine,828,661.24
West,Virginia,465,053.58
North,Missouri,436,235.67
South,Kansas,214,992.47
North,North Dakota,789,640.72
South,Delaware,712,508.55
"@
$xlfile = ".\test.xlsx"
Remove-Item $xlfile -ErrorAction SilentlyContinue
$xlpkg = $data | Export-Excel $xlfile -PassThru
Set-ExcelRange -Worksheet $xlpkg.Sheet1 -Range 'A:A' -HorizontalAlignment Center
Set-ExcelRange -Worksheet $xlpkg.Sheet1 -Range 'B:B' -HorizontalAlignment Right
Close-ExcelPackage $xlpkg -ShowHorizontal Alignment Options |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
that's diff than Nothing specific in the PowerShell functions to do that. try:
See if there is a |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Uh oh!
There was an error while loading. Please reload this page.
-
ImportExcel has heaps of options to control formatting, but indent seems to be missing, or am I the one missing something?
Beta Was this translation helpful? Give feedback.
All reactions