Hi,
Hi,
I am not sure about your requirement. Could you elaborate more and explain which object you are talking about.
For a Shape object, you may utilize some methods for the corresponding row and column, e.g
getLowwerRightColumn
getLowerRightRow
getUpperLeftColumn
getUpperLeftRow etc.
Thank you.
Hi,
Hi,
I am not sure what do you mean by left and top of the image, could you elaborate, so that we can understand you.
Thank you.
Hi,
Hi,
Do you need to put/fit the image into a cell (e.g B2) with 18 pix height and 80 pix width?
Kindly create a simple Excel file (manually create in MS Excel) with your sample image inserted at your desired location in the sheet with your desired height/width, post the file here, we will let you know how you can make it by using the Aspose.Cells APIs.
Thank you.
Hi,
We are a browser based spreadsheet application.
I have attached a document which contains an image in cell B2.
Now consider that, the image is some (200 px, 200px) distance from the start of the grid.
Our requirement:
Now if we want to move the image to cell F6, which is at a distance of 300px, 300px from the start of the grid.
Is there an api like this ? moveImage(300px, 300px) so that it would be positioned in the cell F6.
Moreover, is there an api to find the row and col position by giving the input as 300px, 300px.
Santhosh
Hi,
Thanks for the template file and providing us the details about your requirements.
Now, we understand your needs. Well, we do have some methods e.g Shape.setTopPositionInPixel, Shape.setLeftPositionInPixel, Shape.setTopPosition, Shape.setLeftPosition, Shape.move methods. But, these methods would set a picture at the distance offsetting from the row/column indices. But, I am not sure if these APIs would be more helpful for your need as you need to insert the picture at a distance specifying from the origin of the grid.
Sample code:
Workbook wb = new Workbook();
wb.open(“d:\files\image.ods”,FileFormatType.ODS );
Shape pic = wb.getWorksheets().getSheet(0).getShapes().get(0);
short a = 100;
short b = 1;
short c = 100;
pic.setTopPositionInPixel(1,a);
pic.setLeftPositionInPixel(b,c);
wb.save(“d:\files\outTemplateFile.ods”,FileFormatType.ODS);
We need to analyze your needs if we can implement it. Anyways, I have logged an issue with an id: CELLSJAVA-22971. against your requirements. We will investigate and look into it surely. We will get back to you soon.
Thank you.
Hi,
Please try the attached fix/version. Now we provide some useful APIs for getting/setting shape’s absolute position to the sheet: i.e.
Shape.getPositionX()/getPositionY()/setPositionXY(int x, int y)
where x/y are the distance(pixels) from the start of the grid.
Thank you.
Hi,
Hi,
You need to open the forum thread and then you can download the attachment that I attached to my previous reply in the thread. Also, make sure that you have logged into the Aspose Site before opening the forum thread.
Here is the forum thread url, just click it to open the thread:
<a href="https://forum.aspose.com/t/131917
Kindly let us know if you still find any issue.
Thank you.
Hi,
Hi,
Please make sure that your networking policies (enforced by your company or ISP) allow downloading ZIP attachments.
Could you try to download the file from here
For specifying chart/image x and y positions. Well you should simply add a chart or insert image first using the existing API, then you can specify its x/y positions for your need using the new API. e.g
chart.getChartShape().setPositionXY()
Thank you.
Hi,
Hi,
For:
“Yes, we can do that. In my case i don’t know the (row, col) position to
insert chart. But i know the (xpos, ypos). Using that how can i add
chart?”
Well, you can just add the chart at any row/column position, then you may move the chart shape to your desired absolute X/Y position in the sheet.
For your downloading issue, I can see that you do not login to Aspose site, you have logged in as “Guest” user. Please first open the site “www.aspose.com” then click “Sign In” to login with your valid account. Now, open your thread (this thread) then try.
Thank you.
The issues you have found earlier (filed as 22971) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.