-
Hi, that is the Goal I want to build: In the Examples are the following: `Import-Module c:\temp\importExcel\ImportExcel.psd1 -Force $xlSourcefile = "C:\temp\EXCEL\EXPORT_NEW.xlsx" $xlpkg = Export-Excel $xlSourcefile -WorksheetName AllData -AutoNameRange -PassThru $null = Add-Worksheet -ExcelPackage $xlpkg -WorksheetName Summary -Activate $params = @{
} Add-ExcelChart @params Close-ExcelPackage $xlpkg`
Was just a test to see what happened. I just get an empty Chart.
Is it necessary to pipe data to Export-Excel as in the example? The data is already in the Worksheet AllData? The finished Table is a lot larger. From A -> AA. But the Question is the same. How to define the XRange and the YRange in the Script? greetz Works: Fails: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
Multiple Columns works as well. ;)
$c = New-ExcelChartDefinition -Title "Status"
-ChartType ColumnClustered
-XRange "Processes[Name]"
-YRange "Processes[Status_Active]","Processes[Status_Cancelled]" `
-SeriesHeader "Status_Active","Status_Cancelled"
$c1 = New-ExcelChartDefinition -Title "Aktionen"
-ChartType ColumnClustered
-XRange "Processes[Name]"
-YRange "Processes[Action_Ordered]","Processes[Action_Modified]","Processes[Action_Cancelled]","Processes[Action_Failure]","Processes[Action_Empty]"
-SeriesHeader "Action_Ordered","Action_Modified","Action_Cancelled","Action_Failure","Action_Empty"
$data | Export-Excel -Path $xlSourcefile -AutoSize -TableName Processes -ExcelChartDefinition $c…