Today I was investigating an issue with the Excel pivot table functionality, in the French language, it was failing with the error: 

"La méthode ''createPivotTable'' de l''objet COM de classe ''PivotCache'' a retourné le code d''erreur 0x80070057 (E_INVALIDARG), qui signifie : Un ou plusieurs arguments ne sont pas valides"

This applies to AX2009, to explain in more detail about exactly the steps that lead to this, here's the steps that I have been following:

1. Go to "projet" module
2. Open the "Details du projet" form (the project details form)
3. Select project 10005 in the top grid pane (this is with the standard AX2090 demo data)
4. Click the "Controle du projet" button and then "Statistiques de projet" option.
5. A new form will open, click "Calculer" button in the top right.
6. In the same form click the "exporter vers Microsoft Office Excel" a new from will open.
7. Change the "Releve de projet" drop down to "Travaux en cours" (this is WIP in french).
8. Select a file name in the "nom de fichier" box at the top of the form.
9. Click ok.
10. Error message appears.

So I analyzed the code used here and then resolved the issue in my environment by modifying the label @SYS50076 from "Travaux en cours" to "TravauxEnCours", just removing the spaces.

This is the label used for the enum ProjExportToExcelWorksheet, the element StatWIP, all other French label values for these elements already have the spaces removed in the same way, it appears to be just this one that was perhaps missed.

The problem stemmed from Classes\ProjExportToExcelPivot\generatePivotReport() line 44, where Excel will not accept a tableDestination which contains spaces.

This issue will be addressed in the standard product in a future version of the product and has been officially logged with our development team.

 

There have been several other issues we've addressed of a similar type, so perhaps if this one above doesn't fit your specific issue then perhaps one of the related KB articles below will help you (partnersource/customersource login is required):

AX2009: Export project statement to Excel fails with COM error

 https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;959901

Project statement export to Excel does not work with spanish office

https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;969714

AX2009: Export Cost Control to Excel fails with COM error

https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;974282