AddAuto Shape in Excel

Hi
we are using Aspose Java in our application
I having trouble in Aspose Cells, when try to draw Auto Shape
I am trying to draw a BENT line, from given column, row and giving the width.
Line is being drawn but not starting at given Column , say column 2, instead of starting at end of column 2 its starting some where in middle between column 1 & 2.

Code Snippet:

int drawingType = (widthPixels < 0) ? AutoShapeType.LINE : AutoShapeType.BENT_CONNECTOR_2;
Shape addShape = shapes.addAutoShape(33,
29, 0, 2, 0,
102, 405);

Shape addShape = shapes.addAutoShape(drawingType,
fromRow, 0, fromCol, 0,
sheet.getCells().getStandardHeightPixels()*heightInRows, widthPixels);


Attached is snapshot of excel.


Hi Rajitha,


Thank you for contacting Aspose support.

We have evaluated your presented scenario while using the latest version of Aspose.Cells for Java 8.4.0.5, and we are unable to observe any problem with the AutoShapeType.BENT_CONNECTOR_2. Here is our testing code and also attached is the resulant spreadsheet for your review. Please note, the values for the parameters top & left decides where the connector will appear to join with any cell.

Java

Workbook book = new com.aspose.cells.Workbook();
Worksheet worksheet = book.getWorksheets().get(0);
Shape addShape = worksheet.getShapes().addAutoShape(AutoShapeType.BENT_CONNECTOR_2,
1, 0, 1, 100, 40, 40);
book.save(“D:/output.xlsx”);