Arrow line

Hi,

Can anybody let me know how to draw an arrow line using aspose.cells.

Regards,

Suchindhraa

Hi,

Thanks for your inquiry.

Please refer to the following sample code for your requirements.

Sample code:

//Instantiate a new Workbook.
Workbook workbook = new Workbook();
//Get the first worksheet in the book.
Worksheet worksheet = workbook.Worksheets[0];
Aspose.Cells.LineShape line2 = worksheet.Shapes.AddLine(7, 0, 1, 0, 85, 250);
line2.LineFormat.ForeColor = Color.Blue;
//Set the line style.
line2.LineFormat.DashStyle = MsoLineDashStyle.Solid;
//Set the weight of the line.
line2.LineFormat.Weight = 3;
//Set the placement.
line2.Placement = PlacementType.FreeFloating;
line2.EndArrowheadWidth = MsoArrowheadWidth.Medium;
line2.EndArrowheadStyle = MsoArrowheadStyle.Arrow;
line2.EndArrowheadLength = MsoArrowheadLength.Medium;

//Make the gridlines invisible in the first worksheet.
workbook.Worksheets[0].IsGridlinesVisible = false;
//Save the excel file.
workbook.Save("f:\\test\\out_arrowlinetest.xls");

Thank you.

Hi,

thanks for your quick reply. I still have problem, with your code. It shows error in

line2.EndArrowheadWidth = MsoArrowheadWidth.Medium;

line2.EndArrowheadStyle = MsoArrowheadStyle.Arrow;

line2.EndArrowheadLength = MsoArrowheadLength.Medium;

The error states that "EndArrowHeadWidth" & "EndArrowHeadStyle" & "EndArrowHeadLength" are not a property of Aspose.Cells.LinsShape.

Please let me know if i should include any namespaces or is there any upgraded version of Aspose.Cells.dll, to refer?

Thanks

Suchindhraa

Hi,

In the older version(s), the apis were not added, so you have to use the latest fix.

I have attached the latest fix (4.5.1.16) in your other thread: <A href="</A></P> <P>Download and save the Aspose.Cells.dll to your specified folder. Kindly remove the older Aspose.Cells.dll reference in VS.NET and add reference to this new fix.</P> <P>Should you have any query, feel free to contact us any time.</P> <P>Thank you.</P>