Worksheet Data Connection

Hi,

Are Worksheet Data Connections supported in Aspose Cells?

I have a Worksheet with a Pivot Table bound to a Table based datasource; opening the Worksheet and just saving it (with no modifications) results in the connection being removed from the worksheet.

Thanks,

Dale

Hi Dale,

Thanks for your posting and using Aspose.Cells.

Yes, you can create or manipulate Data Connections using Workbook.DataConnections property. However, this feature is supported recently.

Please see the following articles for your reference.

( Retrieving SQL Connection Data|Documentation )
( Modify existing SQL Data Connection using Aspose.Cells|Documentation )

Please download and try the latest version: Aspose.Cells for .NET 8.5.1 it should fix your issue.

If your issue still occurs, then please provide us your source excel file. We will look into it and help you asap.

Hi,







These articles are for Sql Connections not Worksheet connections.







Please find attached my Excel document and the simple code sample than removes the connection.







Thanks,



Dale

Hi,


Thanks for the template file and sample code.

I could not find the issue using our latest version Aspose.Cells for .NET v8.5.1. Please find attached the output file that is created using your sample code with your template file. The connections are retained and not removed in the output file. I used Ms Excel 2007/2010 to open the output file into it.

If you still find the issue, kindly provide your output file with v8.5.1, we will check it soon.

Thank you.

Hi,



So using Excel 2013.





Click on the data tab





Click connections





Select the DataSource connection





then in the lower half of the dialog click





Click here to see where the selected connections are used.







I get the message





Connections(s) not used in this workbook







Thanks,



Dale

Hi,


It looks like the issue can be observed opening the files (input and output) in Ms Excel 2013, we will check it out soon. By the way, could you use MS Excel 2007/2010 to evaluate your issue as I cannot reproduce it using Ms Excel 2007/2010?

Thank you.

Hi,

Not really possible as my client is using Excel 2013.

Many thanks

Dale

Hi Dale,


Thank you for your continues support in identifying the problem.

Please note, we are able to verify the presented behavior with Excel 2013. It seems that the Workbook’s data connection gets removed by re-saving the spreadsheet with Aspose.Cells for .NET 8.5.1. We have logged an investigative ticket (CELLSNET-43792) in our database to look further into this matter. Please allow us some time for proper analysis. In the meanwhile, we will keep you posted with updates in this regard.

Thank you for the support

Hi Dale,


This is to inform you that we have fixed the problem logged earlier as CELLSNET-43792, and we will shortly provide the fix here with the upcoming maintenance release of Aspose.Cells for .NET.

Hi,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.5.1.1 and let us know your feedback.

Hi

Yes this now maintains the connection, great job!

It does not maintain the slicers are these not supported?

Thanks,

Dale

Hi Dale,


It is good to know that previously recorded problem has been resolved with latest release. Regarding Slicers, I am afraid, Aspose.Cells APIs currently do not support them. By the way, are you experiencing this problem while re-saving the spreadsheets with latest revision (v8.5.1.1)? If so, please share the spreadsheet in question.

Hi,

I don’t see the problem now with the slicers.


I will monitor and let you know if I come across any issues.


Thanks for the support

Dale

Hi,

Thanks for your feedback and using Aspose.Cells.

You cannot create/manipulate Slicers however if you will resave your workbook with Slicers, then it should not be corrupted and remain good.

Let us know if you again encounter any such issue, we will be glad to look into it and help you further.

Hi,







Sorry, this should probably be a new thread but is related.





Saving of a workbook with slicers in is still a problem, please see the attached project when slicers are removed.





This is using the supplied hotfix 8.5.1.1





Thanks




Dale

Hi Dale,


Thank you for sharing the sample spreadsheet.

We have evaluated the presented scenario while using the latest version of Aspose.Cells for .NET 8.5.1.1 and we are able to notice the problem. The resultant spreadsheet cannot be loaded with Excel application without recovery, whereas the recovery operation removes the slicer from the spreadsheet. We have logged this incident in our bug tracking system under the ticket CELLSNET-43799 for further investigation. Please allow us some time to properly look into the matter, and get back to you with updates in this regard.

Hi,





I have the same issue when I add a chart, the sheet has an error when opening it.





This happens just by





var wb = new Aspose.Cells.Workbook(“PivotMaster.xlsx”);





wb.Save(“new.xlsx”);





Thanks,




Dale

Hi,

Thanks for your posting and using Aspose.Cells.

I have tested this issue with your provided sample code and source excel file using the latest version: Aspose.Cells
for .NET v8.5.1.1
and did not notice any error.

I have attached the output excel file for your reference. Please download it and see if you can notice any error. It will be helpful if you provide the screenshot of error.

We will look into your issue and help you asap. Thanks for your cooperation.

C#
var wb = new Aspose.Cells.Workbook(“PivotMaster.xlsx”);
wb.Save(“new.xlsx”);


It fails on open, Excel 2013 as before




Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.
Removed Part: /xl/drawings/drawing1.xml part. (Drawing shape)



Thanks,
Dale