Java POI API - Drawing pie chart in XLS - java

I have searched for this and implemented it using a template file with sample data and the pie chart in it. I need the following:
I want to add more rows (add more data). Modifying the existing data in the defined data range works fine. (Adding extra row by using shiftRows() did not work)
I want to move the pie chart in the current sheet. I might have the pie chart in a specific position in the template. But, I need to modify the data and need to move it to a different position within the sheet.
If anyone can provide direction on this or point to a working example, it would be really helpful.
NOTE: I want a pure POI solution.

Please check if this can help.
JFreeChart

Related

Extract "Graphic" Line positions with PDFBox

I am currently working on a little java application to transform some PDF bound data and I am using PDFBox for this. The pdf itself is very simple and just contains some headers and a table which seperates rows with a line. I am trying to find the coordinates of this line so that I can dynamically extract by area as some rows vary with their height. I have not really found any information on this during my search as almost all results deal with "text lines" and not actual lines. Is this even possible with PDFBox or will I have to look for another pdf library.
Any information would be greatly appreciated.

add a borders to all cells of excel even the empty one using apache poi

I add a border to cells i used in the excel, but i need to put borders to all cells on the excel even the empty one
The idea behind the JXLS is that you Pre-set all kind of time consuming parts(styling, layout...) into a template and your main job is is to establish the back-end beans and fill up this template with those beans.
This is very a very neat tool which makes you focus more on business logic instead of programming for those styling stuff :)
Try to put a white character (e.g. "space") into empty cells.

Aspose.cells How to add differnt Y values in scatter chart

Im using aspose.cells for java.
I want to insert two different lines a scatter chart, but they have different both X and Y values. X values is not a problem with
chart.getNSeries().add("C1:C19", true);
but i can set only one CategoryData with
chart.getNSeries().setCategoryData("B1:B19");
Is there any other way to do it (insert columns E1:E19 as Y and D1:D19 as X values) ?
Im searching it of ages, and i cant find a solution.
Thank you.
:)
Well, you may try to specify the x values for a particular data series in the way:
e.g
Sample code:
chart.getNSeries().get(index).setXValues("......");
If you still could not evaluate, kindly provide your current sample code (runnable), template file(s) and your expected file that should contain your desired chart that you may manually create in MS Excel, we will check it soon.
Note: I am working as Developer Evangelist at Aspose

How to display filtered data in JFreeChart

My problem is that I cannot display data which is filtered by date from database in JFreeChart. Filtering from database works fine, and it is showed on the console. But how to insert that data into series in dataset. I am still trying to solve this problem. I hope you guys can help.
You might look at JDBCXYDataset, which can detect a time series based on metadata. Click on the class name to see the corresponding source, for example.

Inserting image in to the excel cell using jxl api

I have to insert image in to the excel cell using jxl api
I have tried with some sample code but it will insert at some coordinator, but I want in to at particular cell index or inside cell.
Here is sample code that I found while searching for this.
Anyone has solution for this?
From a discussion on channel9:
No version of Excel allows you to insert a picture into a cell. Pictures are inserted into the worksheet and will always float.
One of the properties of a picture can be set to "move and size with cells" but that only moves or stretches the picture when the underlying rows and columns are inserted, deleted or sized. It does not confine a picture to a cell.
Here is a step-by-step procedure on how to do it from Excel, maybe you can mime it programmatically.

Categories

Resources