VBA - Data string connection to Web Access Table on Sharepoint - web-services

I was wondering if it is possible to create a data connection through VBA connecting an Access 2010 table hosted on SharePoint 2010 and Excel 2010? if so what would the code look like? The code would need to be in vba for excel

Since my original post, I have found a work around and I hope this helps others. Here is the connection string needed to connect excel to a Access service table.
Sub LinkedSharePointList()
ActiveSheet.ListObjects.Add SourceType:=xlSrcExternal, _
Source:=Array("URL HERE", "TABLE NAME HERE", _
"{GUID HERE}"), LinkSource:=True, Destination:=Range("A1")
End Sub
* It is important to note that you must save the excel file as a 97-2003 .xls file. The excel file will still run macros and save (though there will be an warning as you try to save the file, just check the don't remind me box). Also, in order for the table to update to your access service table, you need to right click the table (in excel)-> table->synchronize to SharePoint list.
I also wrote a macro to update the access service table using a button control but did not include that here. If you are unsure what your GUID is then import the table from access service to excel, under the data tab->connections->Properties->Definition and in the 'Command Text:' after will be the GUID.

Related

PowerBI on demand report/dataset generation

Perhaps better to rephrase my question.
If I have a powerbi report..
Can I somehow make copies of this report with different data(set?) via an API and on demand?
e.g.
User requests a report with some parameters,
Existing report gets copies with a new dataset and published
tnx
Brian
== origional question below ==
Would anyone be able to point in in the right direction here.
I currently have a c# application that generates reports which are simply excel files.
Each time I create a report I simply open an excel file with some preexisting formatting, set the data in a particular sheet then save it to a new location.
How can I achieve something similar with PowerBI?
Ideaily I'd like to open a precanned powerbi report, pass a parameter to the 'dataset' I've just generated,
I dont have any string feeling as to what the dataset would be, I'm open to whatever works,
database/static dataset created by csharp somehow/webservice/etc.
Can anyone suggest how? tnx
How about creating you Power BI report based on your existing Excel files? Make sure to store them on SharePoint so that the PowerBI Online Service can pick them up w/o additional gateways. You can then use your app to trigger the report refresh as soon as the Excel files have been updated.

How to use real database in Power BI and make it refresh dynamicaly?

I'm new to Power BI (Free Version) and I have been asked to develop a report system which generates report from an excel sheet, the reports work good for only the data I have collected.
but my question is how to connect to the data immediately from SQL server without the need to convert it to excel and then import it in power BI, I also want the data to be refreshed dynamically.
One of the solutions I tried is to add new dataset but I get the following message:
Refresh can't be scheduled because the data set doesn't contain any
data model connections, or is a worksheet or linked table. To schedule
refresh, the data must be loaded into the data model.
I have looked for many solutions but none has worked.
am I missing a concept? thank you
If this data is stored in a SQL SERVER table it is a pretty straight forward process.
When you create a new power bi report (.Pbix) you should see a prompt asking you if you want to "Get Data". You would select the 'SQL Server Database' option - See the image below:
Then, you will be asked to enter the Server and Database name, and to specify either 'Import' or 'Direct Query' mode. If you choose 'Import' the data will be refreshed every time you access the report or upon 'Refresh' within a report session. If you choose the latter, the connection will always be live i.e. any changes to the data in your database will be reflected in the report.
Once you get passed this window, you will be asked to either specify credentials or use a windows authentication to access the database and server. After that you can either specify a query to pull in some data or you can select from a list of tables.
I hope this helps!!

SSRS (SSDT 15.1.6, with Visual Studio 2017) no longer supports query building using query strings?

I haven't worked in SSRS for a few years. But I recently changed jobs and my new responsibilities include a heavy dose of report building. In my experience with SSRS I've always been able to build a dataset by including a query string. (See first image.) But I'm using SSRS via a Sql Server Data Tools install in Visual Studio 2017 for the first time, and I have been unsuccessful in sussing out how to include a query string when building a new report. This newer version seems to only offer a graphical, drag-n-drop solution. (See second image.)
How do I create a dataset that relies on a query string, or barring that, is there a way to build a dataset that relies on joined tables, with filters?
Old query designer in SSRS
New query dataset builder
You can still write your own queries. Skip the wizard and start a blank report. Right click data sources and add your SQL server. Then right click Datasets and add a new one. Select "Use a dataset embedded in my report" and your SQL server as the data source.
Now you should see the query window and you can click Query Designer below it. In the top left of the query designer there is an "Edit as Text" button that will allow you to write it out.
Once you have your dataset made you can quickly get back to the query designer by right clicking the dataset and selecting "Query..."

Sharepoint 2010: best practice to migrate legacy data to sharepoint list

I have to migrate some legacy data from stand-alone sql server database to sharepoint list.
I'm going to use programmatic approach and write a code that communicates with sharepoint list asmx web service.
Are there some "data transformation wizards" to simplify such a task or a better approach to port legacy data from sql server database to sharepoint list?
Thank you in advance!
Being one time operation, I would not worrry about Best Practice but would consider what's the fastest way to do it.
You can use Excel 2010 (I have not tested it with Excel 2007) export data to Sharepoint 2010. Here are the high level steps:
Import data from SQL Server using DATA Tab in the ribbon
Excel would automatically create a TABLE
Now you can prepare the data for Export to Sharepoint. Here, you can remove unwanted columns, add new columns remove unwanted rows, arrange columns etc.
While being in the Table, access the "Export Table To Sharepoint List" functionality to publish you data to Sharepoint. More information about this is available at: http://office.microsoft.com/en-gb/excel-help/export-an-excel-table-to-a-sharepoint-list-HA010131472.aspx
It is quick! but let;s be aware of the limitations:
1. It cannot publish data to a list which already exists
2. It will not create a content type for the exported list. The columns are directly attached to the list.
If you want greater control over the migration, programming may be the way to go unless someone has a better idea in this great forum!

Anyone using a web service as a data source in Excel 2007?

Can I use a web service as a data source for creating Excel pivot tables?
Currently, the soure data for the pivot table is being exported from our SQL db to a CSV file. Then, the CSV file is loaded into a worksheet. From there, a pivot table is created in the same workbook.
Customers login to a website, click some links, and an excel file (with data and pivot table) is generated. This is a public app so the preference is to not connect directly to the DB.
We control the database and generate the output. We are looking to streamline this process. The SQL db and pivot tables can not / will not change.
See http://www.vertex42.com/News/excel-web-query.html
What format does the "public-facing website" use in making the data available? A data file, a table on a web page? This issue will determine how much of a scraping operation you'll need to do.
You'll still need to write the web service and have it run on a server. A possible alternative is to use Yahoo Pipes to do the conversions for you.