I have used JXLS to try to create a multi-page report with a chart in each sheet but it failed.
Imagine a scenario where you have data about monthly sales about a few products,
so each tab would be a Month and then each month would have a chart about sales of the products.
So I am looking for a Java API that can clone a template chart and put copies of these into separate sheets/tabs.
I was able to create the multiple sheets based on a template file, and was able to get the chart to be copied to each sheet from the template, but the "range literal string" that needs to be put into the Chart series was not dynamic in that it had the same reference to the first sheet from the original template.
When I spoke to the Author of JXLS he said he will try to look into it, but it has been over 1.5 years now and no progress.
My question is if anybody knows if "x4j-analytic" can create such reports.
I hope the author of this project: jbaliuka, can make some comments on this.
There is another java excel reporting project called JETT, I posed the same question on their forum/mailing list, but the author Randy Gettman does not seem to be actively looking at it.
Sincerely,
Palu
x4j-analytic library does not support dynamic sheets too. I normally use pivot with dynamic columns to display such data, pivot charts should work too. Dynamic sheets might be useful to workaround Excel limitations for very huge reports but I did not have such problem in practice and this feature is unimplemented.
Related
I am trying to make some existing PDF's into templets.
Because these documents hold real data I am replaceing this data such as names and addrsss and making them into dummy place holders.
Examples
[[Name]]
[[Address1]]
When I alter the text via the iText version 5 library replace via a program I can use the template.
To speed things up I tried to use Adobe DC.
When using this method the template stops working.
Any ideas?
From what I understand of your question;
you have (or want to have) a template document
fill in the template with data from a program
turn this back into a pdf
You can easily achieve some of your goals with iText.
I suggest you look into http://developers.itextpdf.com/examples/form-examples/clone-filling-out-forms
What are th options for working with an excel workbook from within a groovy (java) environment? We would like to be able to use the following features
add sheets
add cells: headings and data
format columns, rows, cells
and potentially
form pivot tables
copy the pivot table by value
paste clipboard by value on another screen
Essentially this will allow us to forma pivot table but remove the underlying data from the worksheet.
Thoughts? Thanks in advance.
Try apache poi. Can definitely perform your first list of requirements. I have used this api a good bit. If you have any questions, please feel free to ask.
Several Java libraries are available to handle the requirements you're looking for:
Apache POI
OpenOffice API
JExcelAPI
Jacob
...
Not sure which one can easily handle pivot tables.
Good luck with your project!
Wim
This page describes some more Groovy-specific options, but my recommendation would be to use Apache POI, either from Java or Groovy
I am working on a project here that ingests internal resumes from people at my company, strips out the skills and relevant content from them and stores it in a database. This was all done using docx4j and Grails. This required the resumes to first be submitted via a template that formatted everything just right so that the ingest tool knew what to look for to strip the data.
The 2nd portion of this, is what if we want to get out a "reduced" resume from the database. In other words, I want to search the uploaded content I now have, and only print out new resumes for people who have Java programming experience lets say. So I can go into my database, find the people who originally had java as a skill, and output a new set of resumes that are also still in a nice templated format, and only have the relevant info in them, instead of ALL the content.
I have been writing some software to do this in Java that will basically use a docx template, overwriting the items in customXML which are bound to the content controls in the doc, so the new data shows up and can eb saved as a new docx with that custom data.
This seems really cumbersome to me, and has some limitations. For one, lets say my template has a place for 3 Skills, and the particular person has 8 skills. There seems to be no good way to add those 5 additional skills to the docx other than painstakingly inserting the data with all of the formatting XML tags and such. This is a real pain, because if the template changes, I dont want to have to go back into my software and edit source code to change that additional data input XML tag to bold instead of italic.
I was doing some reading up on using Infopath to create a form that I could use to get the input, connecting to some sharepoint data source or something to store the stripped out data. However, I can't seem to find out if it is possible using sharepoint to get the data back out, in a nice formatted way. What would the general steps for this be? It seems like I couldnt find very much about this topic with any quick googling.
Thanks
You could set up the skills:
<skills>
<skill>..</skill>
<skill>..</skill>
and use a "repeat" content control pointing to the container. This would handle any number of <skill> entries.
There is a requirement to read multiple Excel "Lists" from one sheet in an Excel file.
I need to know if there is an inbuilt method/api to obtain the dimensions of a list or deal with list specific data. At the bare minimum, is there a way of knowing the "headers" of the list and the number of rows contained in the list data?
I want the POI wrapper that I am writing to be aware of the data elements on the excel, rather than being told through properties/constants or worse; hardcoding the names of the headers/size of the list.
Regards, Vinu
PS: No idea whether the question made any sense...but anyone who gets my drift...please!
I've just written something to do this. AFAIK, Poi itself doesn't understand lists/tables, but you can easily write a wrapper that does. Alternatively, there is the jxls project - this allows complex mappings from POJOs to spreadsheets, and has table reader functionality.
How to: Excel Files has a number of links to projects that might be useful, including an Excel JDBC driver.
Can anyone tell me where do I find some useful documentation on handling copying rows, cells, columns from one excel file to another, using POI?
I need to insert in one blank excel file, 2 or more templates from other files, dynamic.
I also need to keep all the styles made for the group of cells that I copy. How can I do that? Nothing found on apache poi tutorial on this point.
I am using POI 3.0.1.
Thank you!
I assume the problem is data types and merged cells? It's easy enough to get and set styles and set values.
Depending on your use case, you might be able to take entire sheets from the original document, assemble the new document from those and tweak it to your liking. Even if you have to combine multiple source sheets into one target sheet, you might still be able to retrieve source rows and assemble the target document from those rows.
...that was me some time ago...
I never could copy from one excel file to another with the exact style, but I found a solution : I used multiple worksheets instead of multiple excel files, cause style has no problem in being copied from one sheet to another as long as it is in the same workbook.
I also migrated from POI3.0.1 to POI 3.6. Far much better.