There are two important pieces to your post which really need to be answered before any sort of plan can be developed:
1. How are you storing the inventory? Is this being done in Excel, or is the reference to Excel just a "helper" so that people know what you are trying to do.it in Excel, Access, or SQL. Each has benefi=OK, so you have your own inventory management system, and it is written in C#.
2. Where is this pivot table going to be? In this application or are you trying to add it to an existing Excel workbook.
Now if your data is in Excel and that is where you want the Pivot to be, you would probably be better off creating an Excel Template with the pivot table and then programmatically populate the source table, and fire off a refresh Macro. This would be more of VBA and could probably be answered better in an Office users' group.
Now, if "Excel" was only used as a reference to give us a visualize what you are trying to do....
If you are using Object (Orientated Programming) you may have heard of something called LINQ. There are many examples of how to use LINQ to create a Pivot, and there is an answer to another question here which has an example that may help:
Dynamic pivoting in linq C# MVC[
^]
Then again, if you are using SQL Server for the data storage; you could create queries or stored procedures which can do the Pivot as well.
SQL Server PIVOT Operator Explained Clearly By Practical Examples[
^]
The above can be expanded into many different scenarios and possible resolutions... And I hope you can now see that your question is missing important details that are necessary to properly help you out. This is not a "code-for-hire" service and even if it was there are dozens of possible solutions for you.
The best thing for you to do is to use the
Improve Question
widget below your original question to fill in the blanks as well as show the code you have so far relevant to the data you have and it's structure.