Open bovirus opened 2 months ago
need to see the data, script and what OS you are working on
@dfinke
OS: Windows 10 22 H2 64bit italian
Scope of this process
open a csv sort csv on some fields remove some fierdls (tarspose) save it as Excel table
The xlsx file created, opened with Execl 2013 and set column autozise have a larger columns.
If you have any sugegstion thanks.
which columns have the issue?
-AutoSize
is best guess. When the xlsx is opened, the cells are rendered and the font can result in the column widths being off.
$xlpkg = $data | Export-Excel test.xlsx -AutoSize -PassThru
Set-ExcelRange -Worksheet $xlpkg.Sheet1 -Range "C:C" -Width 22
Set-ExcelRange -Worksheet $xlpkg.Sheet1 -Range "E:E" -Width 32
Close-ExcelPackage $xlpkg -Show
My scope is to create an Execl file as table with columns autozize 8adapt column size to larger data vailable)
If I use a funcion like
Export-Excel -Path ExcelFile.xlsx -TableName Table1 -AutoSize"
I create a file ExcelFile.xlsx and openiong it I can check that the coumn size is not set automatically because if I sue in execl columns autozie the column are larger,.
What's the matter?