Hi,
I want to copy my pivot graph from one workbook to another workbook. In the target workbook there should no reference of source workbook data.
So I need only graph in my final workbook, and also it should be graph not as Image.
Is this possible with aspose.cells??? If yes the how.
I tried to use given example but it copied all source data and source graph also with destination graph.
Regards
Sanjay Kumar Mishra
Hi Sanjay,
Hi Raza,
Thank you for your quick response. I think manually you can do with excel. You can copy the graph and paste in other workbook or other way also. But we don’t want it manually.
Suppose, if we can do this task in same workbook, after paste the graph can we remove the reference or can we delete the data source sheet.
Regards
Sanjay Kumar Mishra
Hi Sanjay,
Workbook srcworkbook = new Workbook(“D:/book1.xlsx”);
//Create a new spreadsheet
Workbook desworkbook = new Workbook();
//Copy the contents of the source into destination Workbook
desworkbook.copy(srcworkbook);
//Set the Active Worksheet for destination Workbook to the one containing Chart
desworkbook.getWorksheets().setActiveSheetIndex(1);
//Remove the first Worksheet that contains the data source for the Chart
desworkbook.getWorksheets().removeAt(0);
desworkbook.save(“D:/output.xlsx”);