I want to add a Line in an excel and align the line vertically.
I tried with the following code :
Shape shape0 = shapes.addShape(ShapeType.Line, 9, 0, 40, 0, 100, 200);
Line is getting created but the alignment is not coming vertically.
Please find the attached screenshot of the Line shape created.
Could you please help me on how to align the line vertically.
Worksheet worksheet = workbook.getWorksheets().get(0);
ShapeCollection shapes = worksheet.getShapes();
shapes.addShape(MsoDrawingType.LINE, 5, 0, 1, 0, 250, 0);
workbook.save(dir + “output.xlsx”);
Hi Babar Raza,
Thanks for the code snippet!
Its working fine now.