Excel refresh fails on OneDrive for Business - excel

My excel workbook has the following solution implemented:
The solutions is to loop through multiple excel files on OneDrive into one. The excel has the following sheets:
Sheet1(Home Page): This has a table with a Key-Value pair. Key stands for the department and value is the path of the files on SharePoint
Sheet2: This sheet has the data from all the files mentioned in the Sheet1.
This is implemented using the power query. I’ve created a custom function in Power query to loop through the files in the table mentioned above and get the data.
The function to pull the data looks like this:
This solution works perfectly when I refresh from my excel desktop.
When I place the file on one drive and open the same excel on the browser and hit refresh connection I see the following error:
Inputs on troubleshooting this error will be appreciated.

Excel Online does not support Power Query. You can have a data model and use pivot tables based on that data model in Excel Online, but you cannot refresh Power Queries or external data sources when you open the file in the browser.

Related

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 Protected Data Source For Power Query

I am exporting reports from QuickBooks Online as Excel attachments via email. I am then using Microsoft Flow to save the attachments to Sharepoint. Then, I am using those Excel files stored in Sharepoint as the data source for my reporting. I have one report (out of 7) that's coming through with a protected view, which is causing it to look like this in Power Query:
The actual Excel file looks like this when I open it:
From what I can deduce, this is because there's some level of protection on the Excel file. However, the other theory I have is because each of the cells have "=" before the numeric value. In other words, the first cell has "=750" instead of just "750". If I go into Sharepoint, open the file in Excel Online, remove the "=" in just that one cell, and refresh Power Query, then the amounts show up in the editor as expected.
Is there any way to deal with this in Power Query? Thanks in advance for your help.

Power Query/ Excel - automated query refresh

I have introduced several Excel files in the company, which use Power Query to consolidate different Excel files and prepare them accordingly. The structure is as follows:
1st file:
- Query from Access
- Querys from 3 Excel files
2.-5.Datei:
Various Excel files.
Some of these files are updated daily with new records.
That means I have to daily in the excel files with the queries and these update.
Is it possible to outsource this somehow?
Sharepoint, server?
What ideas do you have?
Except a VBA macro which opens and refreshes the data accordingly?
Best regards
If you have one file with Power Query that get data from multiple files with daily refreshed data without any Power Query in them then:
In file with Power Query when you add result of Power Query to sheet you will get connection.
You can customize this connection to refresh on workbook opening or every N minutes.
Is this is what you want ?
Here:
http://www.excel2013.info/power-query/automatic-update/
you can see in "Refresh the connection" section how to customize connection.
Refresh the connection
Because your data is in a table, your table is link to your source of data. When you will receive a new csv file with the same name, in the same folder, you just have to refresh the query to update your workbook or you can refresh automatically your table when you open your workbook. To do that, you have go to the menu Data > Connections
In the dialog box Workbook connections, you select one of the connections of your workbooks (here there is only one connection) and you click on Properties …
Select the option Refresh data when opening the file
Don’t forget to save and close your file.
If you have multiple files with Power Query and one file get data from another files results of Power Query then you can schedule some code to refresh connections. You can create Console App (C# language), add some library to work with Excel, get target files, open its workbook, refresh connections.
Like here:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/b288098d-d4e8-4845-ae3f-38ad235e22aa/how-to-execute-a-quotrefresh-allquot-for-excel-programmatically-in-c?forum=csharpgeneral
Open Excel File, Refresh Query and Save C#
This way multiple files with Power Query will have always updated results of Power Query.
And your one main file with Power Query that get data from results of Power Query from this multiple files will have always updated data.

Excel PowerPivot - change data source type

I have an Excel 2016 with 30 graphs based on PowerPivot. PowerPivot fetches the data from another Excel sheet, but I want it to get the data from a SQL server table instead.
How can I change the data source type in PowerPivot? I've tried looking in the Excel xml without any luck. Would be a lot of work re-creating all graphs over again just to switch data source
Thanks
Dennis
One suggestion I would make for the future, if all the users are using 2016 is to use Power Query which comes standard with that version of excel. In the Power Query loading data into Power Pivot scenario, all Power Pivot cares about is the column names. This means that the query can be changed between data source types without causing issues, as long as the same column names are changed.
As an example, I have one file that based on a parameter flag rips data out of a series of excel files on a shared network drive or Share Point. Both of which would be different data sources. The first opening a folder as the data source, then excel files listed within the folder. The other opening a share point list as its data source, then navigating though excel files.

Using a JIRA saved filter with REST API and 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.

Resources