Hello!
How can I get cells range using some rectangle, that next I can insert picture with size of this rectangle?
You may create a range based on rectangular area cells range as following:
e.g
Sample code:
Workbook workbook = new Workbook("f:\\files\\temp.xlsx");
Worksheet worksheet = workbook.getWorksheets().get(0);
Range range = worksheet.getCells().createRange("A1:B4");
Range range2 = worksheet.getCells().createRange(5,1,5,4);
......
Now you use your own code to calculate the widths and heights of all the cells (involving the range) via Cells.getRowHeight() and Cells.getColumnWidth methods and get total width and height of the rectangular range, so you will insert the picture while settings its width height equal to rectangular area’s height and width.