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.

Sat Jan 18, 2020 4:54 am

I am using 'Callout: Down Arrow 1' shape using spire xls,
can we change its arrow size using spire xls?
I want it like this:
Attachments
Capture 1.PNG
Capture 1.PNG (6.24 KiB) Viewed 1938 times

aksh0614
 
Posts: 23
Joined: Mon Jul 02, 2018 3:53 am

Sun Jan 19, 2020 6:14 am

Hello,

Thanks for your inquiry.
Sorry our Spire.XLS doesn't support directly changing the arrow size for DownArrowCallout shape at present. We are considering adding it as a new feature into our upgrade list. If it can be achieved in the future, I will inform you. As a temporary workaround, you can combine several shapes together like the following code to achieve the similar effect. The attachment is my output for your reference.
Code: Select all
//Instantiate a workbook object
Workbook workbook = new Workbook();
//Get the first worksheet
Worksheet sheet = workbook.Worksheets[0];

//Add a rectangle
IPrstGeomShape rect = sheet.PrstGeomShapes.AddPrstGeomShape(10, 2, 300, 200, PrstGeomShapeType.Rect);
rect.Left = 20;
rect.Top = 20;     

//Add a line
IPrstGeomShape line = sheet.PrstGeomShapes.AddPrstGeomShape(10, 2, 1, 70, PrstGeomShapeType.Line);
line.Left = rect.Left + rect.Width / 2;
line.Top = rect.Top + rect.Height;

//Add a triangle
IPrstGeomShape triangle = sheet.PrstGeomShapes.AddPrstGeomShape(10, 2, 40, 30, PrstGeomShapeType.Triangle);
triangle.Rotation = 180;
triangle.Left = rect.Left + rect.Width / 2 - triangle.Width / 2;
triangle.Top = rect.Top + rect.Height + line.Height;

//Save the file
workbook.SaveToFile("AddShapes.xlsx", ExcelVersion.Version2013);

Sincerely,
Rachel
E-iceblue support team
Attachments
attachment.zip
(5.91 KiB) Downloaded 181 times
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.XLS

cron