I 'm trying to create the pivot table as per the requirement of the Customer using aspose.
But it is not coming up with what customer required.
Please refer the attached output excel file Test.xlsx. In Test.xlsx Summary sheet with Pivot Table is generated by using the code; source data is taken from first sheet SummaryDataSource.
And the another file Customer.xlsx (Summary sheet)is also attached which is needed by customer.
I have also attached the complete code.
Just for your information :When I try to open the Test.xlsx it gives me error: We found problem with some content in Test.xlsx. Do you want to recover. ....Yes/No?
I have started evaluating your presented scenario by taking the Customer.xlsx as required data representation, and I have noticed that if I add another Pivot Table to the Customer.xlsx and save the result as another spreadsheet, the resultant file cannot be loaded with Excel application. In fact, the Excel removes the XML parts related to the Pivot Tables. Please check the attached snapshot for your reference. My suspicion is that the original Pivot Table uses the external data source as found to be “[TEST.xlsx]SummaryDataSource’!$A$1:$Y$1088” present on “D:\Ebilling\EBilling_Invoicing\resultlocation\2015-08-31\14012” location. In order to by pass this problem, I have manually copied the data onto a new Workbook using the Excel application and added a Pivot Table to it. In this case, the Excel still tries to repair the resultant spreadsheet by altering the records in “/xl/pivotCache/pivotCacheDefinition0.xml”.
Please allow me some more time to look further into this matter, and get back to you with updates.
This is to update you that we have done further testing, however we were not able to avoid the Excel’s repair warning while loading the resultant spreadsheet therefore we have logged this incident in our bug tracking system as CELLSNET-43877. Please note, the aforesaid ticket has been logged to address the problem related to the Excel’s repair warning by adding/creating Pivot Table. Once we sort out this problem, we will look further into the requirement of creating a Pivot Table with desired layout.
Please allow the product team to further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.
I am afraid, we haven’t yet received any updates regarding the aforesaid ticket. You have to spare us little more time as the ticket is currently pending for investigation and is in the queue with other priority tasks. That said, I have recorded a note to the aforesaid ticket, requesting the concerned member of the product team to share the insight of the problem. As soon as we receive any news, we will post here for your kind reference.
This is to inform you that the ticket logged earlier as CELLSNET-43877 has been marked resolved by the product team. We will shortly provide the fix here after ensuring the quality and incorporating other enhancements.
Well, Aspose.Cells.tlb is a type library, you do not need this file. Well, a type library (.tlb) is a binary file that stores information about a COM or DCOM object's properties and methods in a form that is accessible to other applications at runtime. Using a type library, an application can determine which interfaces an object supports, and invoke an object's interface methods. In other words, if you wish to call a .NET assembly from a COM client (like VB6 etc.), you need to first register the original component i.e; Aspose.Cells.dll using the RegAsm utility. Then a reference to type library tell the IDE what objects are COM accessible. In your scenario, you will not need the type library file.
Thank you for the confirmation on previously reported problem. It is good to know that you are not seeing the Excel warning while adding Pivot Table to the worksheet. Regarding the layout of the newly created Pivot Table, we are working on your requirement, however, please confirm that you want the layout as Summary of Customer.xlsx.
Please check the following piece of code that creates a new Pivot Table by added a new worksheet to the collection in the same layout as of the Pivot Table in the Summary worksheet. I have also attached the resultant spreadsheet here for your review, moreover, the changes in the code are highlighted in bold for future reference.
Thank you for your nice gesture. Regarding your recent concerns, I have checked the output.xlsx generated on my side and I was not able to find the blank fields in the Pivot Table so I suspect you are operating on a different spreadsheet. Please share the sample spreadsheet showing the blank fields, we will check and share the possible solution with you. If you have changed/modified the code to generate the Pivot Table then please share the modified code too.