@Amjad_Sahi,
I have tried with the SetEmbeddedObject method but still I don’t see label is displaying on the excel sheet for the attachment.
PFA, for the POC done using 20.12.1 version dll.
Thanks,ExcelAttachments-POC.zip (6.4 MB)
@Amjad_Sahi,
I have tried with the SetEmbeddedObject method but still I don’t see label is displaying on the excel sheet for the attachment.
PFA, for the POC done using 20.12.1 version dll.
Thanks,ExcelAttachments-POC.zip (6.4 MB)
We resolved the issue now and we will soon provide you the fixed version.
Keep in touch.
@simon.zhao
I don’t see any change in this fix, it is not displaying the label names on attachments. it would be great if guys could provide one sample solution which will display the attachments in excel along with label names. Below is the method I’m using from this latest fix.
objOle.SetEmbeddedObject(false, binaryXlsx, info.DocumentName, true, “testfile”);
Thanks,
Hello, I share a fix .sln, it contains:
1, ExcelAttachments-POC: this is your test project, but running with Aspose Cells 12.04, it will get a correct result in my environment.
2, TestDotNetCoreProject: a very simple test project.
Please try them, and tell us your result, thank you!ExcelAttachments-POC_fix.zip (5.9 MB)
@leoluo
Thank you for the POC and now it is displaying the labels for attachments. But when I click on the attachment it is not opening the file. Please see the attached screen shots.AttachmentOpenImage.PNG (22.4 KB)
AttachmentIcon.PNG (4.5 KB)
Thanks,
@srinivasaraju.b,
The POC project is displaying the labels as well as opening the attachments on my end. Result.zip (31.2 KB)
Could you run this once again without any changes and share your output file here.
Please try our latest version/fix: Aspose.Cells for .NET v20.12.5 (attached).
Let us know your feedback.
Aspose.Cells20.12.5 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells20.12.5 For .Net4.0.Zip (5.5 MB)
Aspose.Cells20.12.5 For .NetStandard20.Zip (5.5 MB)
And in 20.12.5, we have updated the following versions of the NuGet reference package:
System.Drawing.Common 4.7.0 -> 5.0.0
System.Text.Encoding.CodePages 4.7.0 -> 5.0.0
About this method:
OleObject.SetEmbeddedObject(bool linkToFile, byte[] objectData, string sourceFileName, bool displayAsIcon, string label)
If linkToFile is true, then sourceFileName will work and objectData will be ignored.
If linkToFile is false, then objectData will work and sourceFileName will be ignored.
Only when displayAsIcon is true, the Label will work and the picture will be automatically redrawn,
In TestDotNetCoreProject, please make a change, call it like this:
objOle.SetEmbeddedObject(false, binaryXlsx, dir + “TestFile.xlsx”, true, “abcd”);
@ahsaniqbalsidiqui I could able to open attachments in your file, but if I run the solution in my local and open it is not opening. Attached the excel file. Please have a look.
dest.zip (9.3 KB)
@leoluo
Will this support multiple attachments in the same excel sheet? tried in my solution but every time it is attaching only the last one.
2) Will this code support pdf & jpeg as well?
@srinivasaraju.b,
I have tried the scenario again but could not observe any issue. Could you please share your latest sample solution which you are trying after incorporating the above mentioned options here. We will try the scenario and share our feedback accordingly.
Regarding the support for pdf and jpeg, we are gathering information about it and will share our feedback soon.
ExcelAttachments-POC_12-01-2021.zip (7.4 MB)
@ahsaniqbalsidiqui, please find attached zip file having the sample poc and let me know whether the attachment is opening or not?
@srinivasaraju.b
Please try the latest fix 20.12.6 Aspose.Cells20.12.6 For .NetStandard20.Zip (5.5 MB) with attached Program.csProgram.zip (1.3 KB)
The issues you have found earlier (filed as CELLSNETCORE-90) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao
@aspose.notifier: thank you for the update.
.NET 21.1 this version solved my issue finally, but only thing is there is no file format type for JPEG, ZIP, MSG. but if I set UnKnown the image is displaying like attached file.
Unknown.PNG (4.6 KB)