title: ImportExcel -Add-ExcelChart query on parameter -PivotTable
body: <p>i am testing a script where I want to create Mutliple charts with the same pivot data,
  I am able to get the first chart using the below snippets</p>
  
  <pre><code> $pivotTableParams = @{
      PivotTableName  = "PWAuditData1"
      Address         = $excel.Sheet1.cells["F1"]
      SourceWorkSheet = $excel.Sheet1
      PivotRows       = echo o_username
      PivotData       = @{'Total' = 'sum'}
      PivotTableStyle = 'Light21'
  
          PivotChartDefinition = @{
                          Title="Total Downloads by Users";
                          ChartType="ColumnClustered";
                          Column=5; Row=15; Width=600; Height=500;
                          YMajorUnit=500; YMinorUnit=100; 
                          LegendPosition="Bottom"
                                   }
  }
  </code></pre>
  
  <p>and then call the above definition using</p>
  
  <pre><code>$pt = Add-PivotTable @pivotTableParams -PassThru
  </code></pre>
  
  <p>I want to use the same data from above Pivot Table and insert for example a doughnut chart for which i use the Add-ExcelChart</p>
  
  <pre><code>$pivotSheet=$excel.Sheet1
  
  $pt1 = Add-ExcelChart  -Worksheet $excel.Sheet1 -PivotTable $pivotSheet.pivotTables[0] -ChartType Doughnut -Row 100 -Column 20 -PassThru
  </code></pre>
  
  <p>when the code runs, I am able to get the first chart, but for inserting the second chart it gives error as below,
  Parameter set cannot be resolved using the specified named parameters</p>
  
  <p>image</p>
  
  <p>Question:
  What is the correct way to reference the existing Pivot object which is already? placed on the sheet ?</p>
  
  <p>Thanks for looking to this,
  RJ</p>