// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// Create workbook from sample file
Workbook workbook = new Workbook();

// Access first worksheet from the collection
Worksheet sheet = workbook.getWorksheets().get(0);

// Add the line arrow to the worksheet
Shape s = sheet.getShapes().addShape(MsoDrawingType.LINE, 2, 0, 2, 0, 100, 300);//method 1
//Shape s = sheet.getShapes().addAutoShape(AutoShapeType.LINE, 2, 0, 2, 0, 100, 300);//method 2

//add a arrow at the line begin
s.getLine().setBeginArrowheadStyle(MsoArrowheadStyle.ARROW);//arrow type
s.getLine().setBeginArrowheadWidth(MsoArrowheadWidth.WIDE);//arrow width
s.getLine().setBeginArrowheadLength(MsoArrowheadLength.SHORT);//arrow length

//add a arrow at the line end
s.getLine().setEndArrowheadStyle(MsoArrowheadStyle.ARROW_OPEN);//arrow type
s.getLine().setEndArrowheadWidth(MsoArrowheadWidth.NARROW);//arrow width
s.getLine().setEndArrowheadLength(MsoArrowheadLength.LONG);//arrow length

//Save.You can check your icon in this way.
workbook.save("sample2.xlsx", SaveFormat.XLSX);