Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Sun Sep 25, 2016 9:16 am

Hi

I am a Dynamics NAV developer, using the Spire.XLS for creating excel sheets. We are very happy with it.

Though I have a wish i can't figure out how to fulfill. My users would like that i can embed a picture inside a comment in a cell, to have like a "popup" hover picture when moving the mouse over a cell.

I have created fine an ExcelComment, and i am struggling with the ShapeFill on that one.
Has anyone tried this with success ?

Regards
Thomas Korsgard

gasagroup
 
Posts: 6
Joined: Fri May 06, 2016 12:40 pm

Sun Sep 25, 2016 10:11 am

as it is Dynamics NAV, the code may not be similar to yours. But this is roughly what i do.


ExcelComment := Range.AddComment();
ExcelComment.Scale(50,50);

ShapeFill := ExcelComment.Fill;
ShapeFill.CustomPicture(FileName);
ShapeFill.FillType := IFillType.Picture;

The comment is shown, with normal yellow background. it is scaled. The picture is in the .zip file (if i rename the xlsx to .zip).

It seems like i am missing to tell it something more.

Thomas

gasagroup
 
Posts: 6
Joined: Fri May 06, 2016 12:40 pm

Mon Sep 26, 2016 9:32 am

Hi,

Thanks for your inquiry. Here are the codes for your reference.
Code: Select all
Workbook workbook = new Workbook();
            Worksheet sheet=workbook.Worksheets[0];
            sheet.Range["C6"].Comment.Fill.CustomPicture(@"C:\Users\Administrator\Desktop\rabbit.jpg");
            workbook.SaveToFile("sample.xls");

Sincerely,
Alan
E-iceblue support team
User avatar

Alan.Li
 
Posts: 35
Joined: Mon Sep 05, 2016 2:51 am

Mon Sep 26, 2016 3:02 pm

Hello

Thank you, but this is what i tested. This does not work for me. Does it work in your test ?

Thomas

gasagroup
 
Posts: 6
Joined: Fri May 06, 2016 12:40 pm

Tue Sep 27, 2016 7:29 am

Hello

Your code works perfectly, and I now know the difference.

I want it to work in xlsx format, and not xls (Excel 97-2000)

How do i get it to work in that format ?

gasagroup
 
Posts: 6
Joined: Fri May 06, 2016 12:40 pm

Tue Sep 27, 2016 9:16 am

Hi,

Thanks for your feedback. I have noticed this issue and posted it to Our Dev team. Once it resolved, I will inform you. Sorry for inconvenience.

Sincerely,
Alan
E-iceblue team
User avatar

Alan.Li
 
Posts: 35
Joined: Mon Sep 05, 2016 2:51 am

Wed Oct 19, 2016 6:55 am

Hi Thomas,

Thanks for your waiting.
Now the issue has been fixed, welcome to test Spire.XLS Pack Hotfix Version:7.10.86. And we will inform you when Spire.office is available.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Nov 11, 2016 8:25 am

Hi Thomas,

Thanks for your waiting.
We just release Spire.Office Platinum Version:2.15, which resolved your issue, welcome to test it.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Nov 18, 2016 9:18 am

Hi Thomas,

Did you test the hotfix ? Has the issue been resolved ?

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS