Dynamically create a MS Word report using a JIRA charts? - excel

Each month I have to manually create a report for my team. For this I use a combination of numbers generated from a groovy script I've written, screenshot, cut & paste from a series of charts in our JIRA instance and cut and pasted excel charts.
I'm finding it more and more boring to do this by hand and I suspect that there is an easier way to automatically generate this report. I can generate the word document with data from the groovy script using this application (http://www.docmosis.com/) but I have not yet found a way of auto including JIRA charts in the generation or excel so my question is:
Is it possible to generate a word document that contains generated data from various sources including (in order of importance):
JIRA charts
Programmatically generate data and
Excel charts?

As you already coded your logic in Groovy, best would be skipping the Excel step and generate your report directly from JIRA using the JIRA PDF View Plugin. This plugin will reduce your work to a single click and download you a nice PDF document (PDF is more portable than Word docs).
These short tutorials help you:
Reuse your Groovy scripts for reporting logic (also see the "Charts" tutorial there)
Bring the data, charts and the template together
Update 2 years after my original answer:
JIRA PDF View Plugin 3.5.0+ can also export JIRA charts (gadgets in JIRA dashboards, to be precise). So, now you can execute your Groovy scripts, include JIRA charts and bring all the result together in a professional PDF document.
Even better, now there exists a free plugin that will make the monthly process 100% automatic for you! It will generate your PDF document and send that to your team members' mailboxes, according to the preferred schedule (CRON trigger).
Related tutorials:
Exporting JIRA dashboards to PDF
Automating JIRA PDF exports
Discl: I'm a developer working on these products, yet this is the best solution to your problem. :-)

Most of the charts generated in Jira are created from data returned from search results. So you can get data from Jira using REST or SOAP api and generate your own charts by other means.
I am not sure if there is a no-coding method of doing it. But I would write a C# program that adds data to the Word template from your sources (Jira, other programs, Excel). And would create a template that generated charts from inserted data.
For Word document generation I would have a look here -http://www.codeproject.com/Articles/20287/Generating-Word-Reports-Documents
For chart creation in the document I would have a look here - http://office.microsoft.com/en-us/word-help/create-a-chart-in-a-document-HP005190046.aspx

Easiest if you convert your JIRA chart to an image first. When you say JIRA chart, do you mean something from this plugin?
Once you have an image, your document generation tool ought to be able to include that.
There are many document generation tools which can include programmatically generated data, and some of those can include Excel charts.

There is now a JIRA plugin to generate charts in Word documents which may help you.
https://marketplace.atlassian.com/plugins/com.clariostechnology.officecharts.officecharts

There is now also Intelligent Reporter for JIRA which is a no-code method for creating word documents from your JIRA data, including native Word charts with full formatting from JIRA data.
https://marketplace.atlassian.com/plugins/com.clariostechnology.intelligentreports
Disclaimer: I work for the company that created this plugin. If there is anything you need that it cannot do, please let me know.

Related

generate multiple pdfs from a database

I would like to generate multiple pdfs at once. Those pdfs should pull data from a database. It can be an excel table or a relational database, doesn't matter, I can create whatever.
Using excel and javascript in adobe acrobat pro I managed to pull data into a template pdf, but for every record (row) I have in excel table I have to manually generate one pdf, then another, and so on.. and there are a lot of records, so I would like to do that automatically if possible.
Is there a way to do that? Any suggestions?
I added an image to better explain it...
Look into the Acrobat SDK, Section: "Interapplication Communication" to learn how you can control Acrobat via VB/VBA and how you can work with the JavaScript Object (JSO).
Then have a look into the "Acrobat JavaScript Scripting reference" and look at
the Doc Object with commands like .. addField and at
the Field object to set the properties of the fields.
That should do what you want, Reinhard
PS: With Open Office you can save spreadsheets as PDF and with newer version of Excel too. Wouldn't that be already enough or perhaps a mix of above and this.
Full disclosure: I founded and run Epsillion Software.
mirta, one option is Epsillion Publisher. We built it for your exact use case.
You would need to specify what your template should look like. The Epsillion team will design it for you.
You then specify what your variables are in a Word document (e.g., name, last name, date of birth). The software will process the Word and Excel files and return PDFs for you.
Templates are flexible and flow as needed.
Hope that helps. Good luck!

Download Webi report from Excel

With newly released Webi there's no way to manipulate reports with VBA like it was in DESKI era.
I'd like to know if there's a way for me to click a button with parameters in Excel sheet and get a report from the server?
I've been thinking of using the RESTful Web-services but it seems that there is a performance problem.
I also considered using a JAVA app in the middle using the SDK but it's not really satisfying as I add one layer.
Do you know if there's an other way to download a Webi report from and to Excel?
For this type of requirement, you'd normally use the OpenDocument feature. There is one thing that it won't do however, at least not for Webi documents, and that is deliver the output in Excel format (HTML and PDF are the two possible formats for Webi). In all fairness, the export to Excel option is only about two or three clicks away, but I can understand that this wouldn't be an ideal solution.
Another option is the Java SDK, which I would not recommend, as the ReBEAN SDK (the part of the Java SDK you need to interface with Webi documents) is deprecated and replaced by the REST SDK.
The REST SDK would be the way to go if the OpenDocument feature is not sufficient. Keep in mind that this would involve quite a few steps, each time sending a command to the WACS server and then decoding the answer. The steps would be:
Authenticate and get a logon token
Refresh the document (if necessary pass prompt values)
Export the document to Excel
Close the document
The REST interface is only supported on the WACS server, which should run on your BI4 server (unless you have a customised landscape). If it's slow, I would suggest looking into the root cause of this performance issue, instead of discarding the SDK altogether.
If you're going to use the REST interface, I would recommend opting for JSON to communicate through REST instead of XML. It's easier to read and parse.
A last option, which I wouldn't recommend, is LiveOffice. This is a separate product which allows you to embed contents from Webi documents into Office documents (most notably Excel). LiveOffice has always had its share of problems and has not received much love from SAP regarding much needed updates.
One final thought: the report will never appear in the same sheet, at least not without an additional amount of coding. Whatever SDK you end up choosing, you will always end up with an Excel file. If you want to show the results in the Excel file you started from, you'll need to code the steps to open the generated file, grab the contents and then copy those to your worksheet.

Flexible customization - Generating word document using C#

Problem - Generate a word document from information retrieved from database.
My solution - Create a word document template add fields/tags in places where values need to be inserted. The template will require tables and charts as well. Using document reflector that comes with open office xml sdk reflect on the document template and extract the w:document section and port it to C#. The rest of the logic revolves simply around finding the fields/tags, replacing them, etc. Very simple approach but not very flexible!
Challenge - I want the user to have the ability to customize the template or the generated document output. But this will not be possible if I embed the template logic in code.
Any other possibilities - I looked around at Templating using T4 and RazorEngine but could not find any concrete examples of how to create word documents using these two technologies.
Now what is the best approach?
I would really appreciate your inputs on what is the best and most flexible way to generate word documents using C#.
I'm actually working a project where the business users are designing word template with mail merge fields and we are populating the values using a 3rd party software package Aspose Words. http://www.aspose.com/categories/.net-components/aspose.words-for-.net/default.aspx
The software includes a library for merging data from datatables into the mail merge fields in the word document.
I also wrote a customized word task pane add in that retrieves data views from the database and lists the fields in a drag/drop interface that mimics a crystal or sql report writing interface.
Probably would of been easier to just use crystal or sql reporting though...
It's certainly possible to generate the contents of an Office doc using T4 or Razor and then package it up. The TestScribe powertool for Visual Studio Test Manager does just that with T4. There is a thread by Sally Cavanagh in the Q&A on this page http://visualstudiogallery.msdn.microsoft.com/e79e4a0f-f670-47c2-9b8a-3b6f664bf4ae that suggests a way to look at the T4 templates that it uses, which might get you jump-started.
Here is sample to play word document template with C#
You could use a content control databinding approach.
XML Mapping Task Pane for Word 2007/2010 is an authoring tool.
To create an instance document, you just attach your XML data file.
If the resulting documents will be opened in Word, that is all that is required: Word will bind the data itself. If your consuming application is not Word, you might want to resolve the bindings yourself (eg via Open XML SDK).
Content control databinding isn't intended to support repeats and conditionals. For a way to do that, look at my OpenDoPE convention
Take a look at Templater. Disclamer: I'm the author.
Check out JODReports or Docmosis. They are Java based but some of the templating features and output options might be ideal. You can call the command line interfaces unless they also have something better to reach from C#.

Issue search and excel export for JIRA, outside JIRA

I'm looking to download a list of issues from our JIRA issue list, to process further in VBA and generate a report from the issue list. I want this process to be automated from start to end so e.g. I run a java or VB or C# program, which does a search and download from JIRA (somehow) then runs a VBA program to extract and format the issues into a report. Is there anyway this can be done? I'm using JIRA 3.13.
I've looked at the JIRA and Atlassian plugins but don't quite understand how they work. Aren't plugins meant to be deployed into the JIRA instance. I don't see how plugins can achieve what i want to do.
You'll likely want to use the JIRA SOAP web service via a SOAP client in your program. This can call the getIssuesFromFilter method to return the results of a filter. Then generate the csv file for Excel to import or whatever you want.
Better Excel Plugin was exactly designed for these type of usage.
You can export your issues to a worksheet, then instruct the XLS template to process them using the Excel tools, like formulas and functions, charts, pivot tables and pivot charts, to produce full blown reports. It is fully automatic and the report can be generated by a single click.
If you look for automation, like generating and emailing the report periodically, or generating and saving the report when an issue event occurs, the companion add-on Excel Automation Plugin is super useful.
Here is a sample report to give you an idea about the capabilities:

How do I import an Excel Spreadsheet into a blog..?

We are interested in trying to import an Excel spreadsheet into our Blog.
A sample of the Excel spreadsheet that we generate each day and want to export into our Blog is located at:
http://www.wallstreetsignals.com/WhatsWorking.html
Our Blog is located at:
http://whatsworkinginthestockmarket.blogspot.com/
We are interested in a program or method that would allow us to just import the Excel spreadsheet into our Blog instead of having to hand input all the data, which is what we are doing now.
Thank you for your thoughts and the cost to have you help accomplish our goal.
Philip
WallStreetSignals.com
Well, outside of creating a program (which is possible, using PHP, Perl, Java, etc and either an excel input module or converting to CSV or XML and processing that)...
Have you considered using Google Documents or another online spreadsheet software? It's easy to import an excel spreadsheet, and then embed the spreadsheet in the blog post or webpage. Then if you need to change it, modify the google document spreadsheet and the changes are rendered on the webpage or blog post immediately.
-Adam
The easiest thing might be to use Google Docs. Upload your spreadsheet, then publish from Google Docs to your blog. See this article.
Can your blog consume XML? You can set up an XML Schema in Excel 2007 and just export it to an XML file. You would need to write an XSLT.
I also have a macro that will write out XML to a file... can upload that if it would help...
If your spreadsheet is generated by a macro, you could just modify a macro to generate html or some other sort of blog markup ready for copy and paste.
Excel can save as HTML, which you could then strip the metadata from and use in your website. Unfortunately the HTML that it generates is very bloated. If you do not mind client lock-in, you could consider embedding the XLS file directly on your website, and having your viewers use the IE embedded excel viewer.
If you can use ASP.NET you could use SpreadsheetGear for .NET to load an Excel workbook, grab values, formatted values or even images to display on a web page. There are live ASP.NET samples with source if you want to check it out.
Disclaimer: I work for SpreadsheetGear LLC

Resources