Inserting OLE Documents as linked

Hi,

we are evaluating Aspose.Cells (7.5.2.0) for inserting and updating different kinds of links in spreadsheets.

I cannot find any information on how to insert an OLE object as a linked document. (Resulting in an OleObject with IsLink equals true). Embedding works fine.

We also had no success updating the link path of a manually created OLE link. Neither by setting the SourceFullName property nor by calling SetNativeSourceFullName, we could not see any changes in the spreadsheet after reopening it with Excel.

Thanks,

Peter

Hi,

we are evaluating Aspose.Cells (7.5.2.0) for inserting and updating different kinds of links in spreadsheets.

I cannot find any information on how to insert an OLE object as a linked document. (Resulting in an OleObject with IsLink equals true). Embedding works fine.

We also had no success updating the link path of a manually created OLE link. Neither by setting the SourceFullName property nor by calling SetNativeSourceFullName, we could not see any changes in the spreadsheet after reopening it with Excel.

Thanks,

Peter

Hi,


Thanks for your inquiry.

I suspect inserting OLE Objects as linked might not be supported. Also for your other issue(s) i.e. “We also had no success updating the link path of a manually created OLE link”, we need to investigate your issue on our end. Please create a sample console application, zip it and post it here to show your mentioned issues (unable to insert OLE object as a linked object and unable to update the link path of the OLE object link). We will log a ticket for it and look into it soon.

Also, please use our latest version/fix : Aspose.Cells for .NET if you are not using it already.

Thank you.

Hi Amjad,

Thanks for the quick answer.

In the attached zip file you will find a small sample application and the file containing the ole link.

Hi,


Thanks for providing us the sample project with the template file.

After an initial test as I have tested your scenario / case by using your sample project with your template file, I observed the issue as you mentioned. I could not update the source full name for the OLE Object in the template file. I have logged a ticket with an id “CELLSNET-41928” for your issue. We will look into your issue soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and try this fix: Aspose.Cells for .NET v7.5.2.2 and let us know your feedback.

Hi,

Sorry, it is still not working.

And it is even worse than before. Now, with the 7.5.2.2 version we cannot read out the OLE file path for existing links (SourceFullName is empty). This was OK in 7.5.2.0

Maybe you can send us a code snippet on how you tested it. Just in case we have implemented it in a wrong way.

Hi,



Well, you are right. To set the source full name is working but now we can’t get the ole object’s SourceFullName data from the property at runtime, it is always null.

Sample code:

foreach (Worksheet sheet in book.Worksheets)
{
foreach (Aspose.Cells.Drawing.OleObject oleobject in sheet.OleObjects)
{
if (oleobject.SourceFullName != null) //This will be null, so no condition will not be true.
{
MessageBox.Show(oleobject.SourceFullName);
oleobject.SourceFullName = @“Excel-A-01-02.xls”;
oleobject.SetNativeSourceFullName(@“Excel-A-01-02.xls”);
oleobject.UpdateSelectedValue();

}
}
}

book.Save(@“E:\test2\insert ole documents\Example\Example\bin\Debug\outExample1.xls”, SaveFormat.Excel97To2003);

Console.WriteLine(“Link changed”);
Console.WriteLine(“Press Enter to exit…”);
Console.ReadLine();

I have reopened your issue “CELLSNET-41928” again, we will look into it soon.

By the way, if you do not specify the if condition in the above code, it would work fine to set Source fill name fine in the output file though.

Thank you.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have fixed the issue.

Please download and try this fix: Aspose.Cells for .NET v7.5.3.4 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-41928) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.