Is there a way to scrape data from a Microsoft Form survey? - excel

I am trying to automate my survey analysis pipeline and would like to link the data from a Microsoft Form to an Excel sheet.
This is what the page looks like with results collected:
But you have to click the open in excel to get the table of results. I was wondering if it would be possible to automate this so that it updates to capture all responses like once a day into an Excel sheet...this is what the output looks like when you click the button.
Any tools or tips would be great! I have some experience with R and Python so could implement that too...

Forms is already linked to an excel file, the "Open in Excel" button is a link to the excel file, which is saved either in files on your teams channel or in sharepoint.
The data is in a table automatically, and on sharepoint you can link between tables in different spreadsheets using the Data -> Get Data menu in excel.

Related

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.

How to programmatically create a list from an excel spreadsheet in SharePoint 2010?

I want to create a list from an excel spreadsheet in SharePoint 2010. When a new Excel document is uploaded to a SharePoint library, a corresponding list will be created automatically. Is this possible?
You can do this in two phases:
Create an empty MS Access database and import your excel sheet into it (in MS access go to External data -> Excel, choose your file and follow the steps to import it.
When you get the MS access table with the data from excel sheet, right click the table name in Tables section and go to Export -> SharePoint list. There you can specify the url of your SharePoint site and the name of the new list. Click Ok and wait until the list is created and the data is uploaded to SharePoint.
EDIT:
Since this needs to be done automatically (as stated in comments), this is the high overview of the things that needs to be done, with some useful links:
Create Event receiver for the library that the excel files will be uploaded to.
In the ItemAdded Method write the code that will do the following:
Get the uploaded file
Parse the excel file using the OpenXml library
Create the list in the SharePoint site, based on the columns taken from the excel file
Loop through all the rows in the excel file and insert the list item for each excel row.

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.

how to import data from sharepoint to excel using macro

I wanted to know if there's a way to import data from SharePoint to Excel using Macros. What i want to do is have a library in my sharepoint in which i have an excel document. When i download the document and open it, i would like to automatically import the data from sharepoint and have some graphs.
What i've tried to do is export the data of a list using the SharePoint ribbon. Then i opened the file.dll.iqy in notepad, hoping to find the macros to import datas. What i've found was this :
WEB
1
http://win-sharepoint:9090/sites/PPMO/_vti_bin/owssvr.dll?XMLDATA=1&List={C51D70F2-4D7B-4F20-AE05-379DA264F685}&View={8399F350-92C7-4942- B8B0-464A735AFC72}&RowLimit=0&RootFolder=%2fsites%2fPPMO%2fLists%2fStade%20du%20projet
Selection={C51D70F2-4D7B-4F20-AE05-379DA264F685}-{8399F350-92C7-4942-B8B0-464A735AFC72}
EditWebPage=
Formatting=None
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False
DisableDateRecognition=False
DisableRedirections=False
SharePointApplication=http://win-sharepoint:9090/sites/PPMO/_vti_bin
SharePointListView={8399F350-92C7-4942-B8B0-464A735AFC72}
SharePointListName={C51D70F2-4D7B-4F20-AE05-379DA264F685}
RootFolder=/sites/PPMO/Lists/Stade du projet
I tried to save it as a macro, but the result i got was not the one expected.
Do you have any idea how to do this ?
Thanks a lot
In Excel 2010, you can go to Data / Get External Data / From Web
Then you can browse to your SharePoint List and select your table using the helpful arrow icons.
Similarly, you can open the iqy file with Excel (enabling security on the prompt) then save the new worksheet. You can see the iqy file details under Data / Connections.

Is is possible to populate a SharePoint list from an Excel sheet?

So you can export a list to a spread sheet, but can you do the opposite? Preferably from an Excel sheet.
Go the the Create menu in sharepoint and upder Custom Lists, click Import Spreadsheet. Type the name of the list, browse to the spreadsheet and click Import.
You can also sync your spreadsheet and list on a continual basis by making a list on your spreadsheet and then publishing that to sharepoint.
Open your sheet
Select your data
Click Crtl+l
Click ok
Right click list
Publish list
type name of sharepoint site
name of sharepoint list
click Finish
Yes, you can do it from Excel 2003 :( bit is bit limiting. There is a workaround to do the same from Excel 2007...
But, to achieve best results you should use Access 2007 because it provides you with everything you need. It allows you to do the same you can as from the web interface.

Resources