Using a JIRA saved filter with REST API and Excel - excel

I have a report that I need to update in Excel many times a day using statistics from JIRA. If I can import these directly with code I would save a lot of time and effort.
Is it possible to use a saved JIRA filter in conjunction with the REST API function to import the results to Excel using a VBA macro?

This is a solution does not use REST API, but it may work for you. This is a workaround I am using so far and it works:
Run the Filter in Jira
Export the result list into an excel file using the Export CSV file with the option current field (to avoid having unnecessary fields) and with the right button of mouse select: Open in a new window
Now you will see the URL associated with your filter in a new window of your browser. Your filter is represented by a Filter ID, therefore the query will be always the same.
Go to excel and use the URL as a hyperlink
Every time you click on the hyperlink it will download the file from Jira. You need to have a Jira open sesion in your browser.
Create a VBA marco that click on the hyperlink for downloading the file.
Use Power Query for example for loading the file from the download folder location into a worksheet. Power Query is a new excel feature. Power Query is an ETL tool integrated into excel for loading files and processing them.
The steps 6-7 automates the process. Run the Marco for downloading the file and refresh the content of your worksheet from Data Connection. You can have an additional macro that refreshes the content of the worksheet. It refreshes all pivot tables and the file connection for reading the file.
Hint: Use excel Table for keeping the information updated automatically when additional information is loaded into the worksheet. If you use pivot tables for presenting the data, use as data source an excel table instead of excel range.
It minimizes a lot the manual effort.
Here you can find a solution that uses REST API, the author provides the source code, but it is more complicated. If you need something simple, my solution may work for you.

Related

How can I write back to source excel files when I get Excel data from data tab?

So, I want to create one Excel file each for every manager with only one single sheet and place it on OneDrive.
In order to get the data in one place, I am creating another excel file called combined.xlsx.
Now, I can export each workbook to a tab using Data -> Get Data -> From File -> From Workbook .
This is great so far. So, I can read data of 10 excelfiles on 10 sheets in combined.xlsx.
Now, I want to modify contents of one of the tabs and make sure it is reflected to the original file. How can I do this?
To elaborate on why it is not possible, you need to understand how Power Query deals with data:
You load your data into Power Query via the "Data" tab. The source can be anything Microsoft allows.
You then manipulate the data any which way in Power Query.
As a last step, you decide if and where to load the results. If you only want to create a connection to the query, you select "Close and Load to", which appears after you click on the arrow next to "Close and Load", and you pick that. Otherwise, the only other options are loading the query results to a table, PivotTable report, PivotChart.
Because the output sheets you have are connected to the query that produced them, any time you refresh the query, whatever manual changes you have made in the table that the query created originally will be wiped out and overwritten with the refreshed data.
If you were able to write back to the source here, you'd in effect
create a circular reference.
Check out this article about having Power Query output your data after manipulating it, maybe it helps.

How to copy only updated rows from Google Sheets to Excel

Currently, I'm connecting Jotform to Google sheets where information with the submissions are uploaded. We primarily use excel for the bulk of our operations and would like to connect the submissions uploaded from google sheets to excel. I can use import data from web which excel offers but it more so just copies the entire table even if you delete some rows on excel.
I want to do something similar to what zapier offers where the connection is not just a copy of the entire table and it only uploads new rows uploaded to google sheets onto excel and refreshes frequently.
Is there a way I can do this? My best bet is to use Google sheets API's? But i'm not sure where to get started.
What are "new" submissions? Excel need to know that.
You can directly import the data from jotform to Excel, no need to do it via google sheets.
Yes, even then all submissions are downloaded, that will always be the case. But not all need to be displayed. You can choose in and with Power Query what shall remain and loaded to Excel.
If you don't use a date for what you consider new, you have to store all old data in Excel as well, so Excel can see whether a submission is already downloaded before or not. You could load all data to the Data Model, where it uses very little space.
You need to learn PowerQuery for this. It is very worth it, because with little learning you can do a lot of fantastic things to your submissions and other data.

Power Query to open XML file formatted as Excel would open it

I have an XML file generated by EasyPower (electrical software). If I open the file in Excel it comes up as a series of formatted sheets like the image below. It appears this way without any prompts or dialogs.
I’m creating a Power Query routine that can extract the data from the sheets. Unfortunately when I use the Power Query wizard to select the XML file as a source, it doesn’t see the data as sheets, but rather a table with columns of Tables, seemingly an infinite number of levels deep. Digging through them I’m unable to clearly see the data. This is not a very good approach.
A work-around is for me to manually open the XML file with Excel and save it as XLSX, then it’s easy to work with the data in Power Query. I know a VBA script could be used to this but my question is, is there a way for Power Query to open an XML file and interpret the layout the same way that Excel does? This way would allow my script to also work within Power BI.
Edit: A sample file has been requested. This link will provide a very simple example containing two worksheets when opened in Excel. EasyPower_Test_Schedule.xml

Excel file linked to Access; Access linked to Power Query; Excel file pop up when refreshin PowerQuery

I have the following situation:
1- I have one Excel File linked to my Access database called "Input"
I use this file to create a query that allows to extract only the information from the references in the "Input" file.
2- After creating the query (merge) I get this extraction with the Power Query function from my "Main" table i use to work.
I do this because in the Access i have tables with +1M rows and PowerQuery cannot handle them.
When i refresh my linked PowerQuery tables that comes from "Input+merged info" the "Input" Excel would open.
This happens with every single Excel file i link to the Access and get them with PowerQuery later on.
It seems that to "refresh" the information it is going all the way down to the source of the information and opening it to update it.
There is an option to solve this and it is importing the Excel Files - but that generates an extra work that would complicate everything as Access size would be +2GB.
Does anyone know how to solve this issue?
Thank you!!

Excel 2010 Macro to do the same task again and again

I need to send Sales Report to my colleagues on the end of every week and I pull the same details from SAP (Stockwarehouse Russia). My question is, everytime I need to do the same steps again and again in Excel i.e. editing and deleting the same columns, applying filters, assigning the right description for the exact same fields, Movement Type etc. And it becomes very monotonous and pathetically time consuming.
So is there a way where I can record the steps I performed and store is somewhere on the HDD so that next time I can simply open Excel, run the program and report would be generated automatically?
What you will need to do is record a Macro
http://office.microsoft.com/en-gb/excel-help/create-or-delete-a-macro-HP010342374.aspx
http://www.dummies.com/how-to/content/how-to-record-a-macro-to-automate-tasks-in-excel-2.html
First 2 links in a Google search...
If you are using Excel 2013. I would higly recommend to use Microsoft Power Query AddIn (PQ). With PQ you can easily connect to SAP, than create some transformation with your data and save this as a "script". WHenever you open this worksheet you will have a fresh data. The adventage is that you don't need to use any piece of code and you can save your operation in few minutes.
Later if you will want to automate this operation you can write simple script (avaliable on the net) to refresh the worksheet and just add the code to send somewhere or if you have a SharePoint you can easily share with your worksheet with Power Query script into the SharePoint and everybody should have acces to your transormed data.
Please check: http://www.microsoft.com/en-us/powerBI/SAP.aspx#fbid=OjGdeZslbeu

Resources