Replies: 1 comment 2 replies
-
Thanks for using ImportExcel. Great question! Does this help?$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 = "d:\temp\activeCell.xlsx"
Remove-Item $xlfile -ErrorAction SilentlyContinue
$data | Export-Excel $xlfile -AutoSize -WorksheetName Tab1
$xlpkg = $data | Export-Excel $xlfile -AutoSize -WorksheetName Tab2 -Activate -PassThru
$xlpkg.Tab2.Select("C3")
Close-ExcelPackage $xlpkg -Show |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
At the moment, we are preparing an Excel file manually from Excel UI as our base template, put the initial required formatting, formula, etc and then we run a PowerShell script in Azure DevOps pipeline to generate copies of the template file, then read data from somewhere and populates the generated Excel files. However, we sometime forget to always set the default view or cell position so opening the Excel file in some cases the view starts from some cells that may not make sense to the first time viewer of the Excel file.
Is there some function in ImportExcel module that allow us to set the default view or default cell position when opening an Excel file?
Thanks in advance for any help.
Beta Was this translation helpful? Give feedback.
All reactions