Sharing SQL data through Excel spreadsheet - sql-server

I was hoping to get help to find a solution.
I have an excel spreadsheet that connects to my SQL server and populates a spreadsheet based on a query i have written.
I want to share this spreadsheet with 10 users.
This is were the problem comes. In order to share the spreadsheet i have to remove the link. Meaning the connection to the SQL data is lost.
The database is frequently updated so need to keep the connection live. All 10 users might be in the spreadsheet at the same time working on cases.
Is there a way for me to do this as iv search high and low and cant find a solution. I am almost tempted to create a c# app that will allow me to do this instead of using a spreadsheet, Any suggestions will be very much welcomed
Thanks

Take a look at https://cirkulate.com. We are working on such a service that enables developers to go from SQL to automatically refreshing spreadsheets.
You'll only need to specify SQL that populate the cells, the refresh schedule(optional) and the recipient email addresses.
When the spreadsheet refreshes, all the recipients get the latest copy of the spreadsheet along with a snapshot of the spreadsheet in the email body, so they consume a quick snapshot within the email client.
Disclosure: Just to be clear about affiliations, I am the founder of Cirkulate.

Related

Sync API table to SQL Database

I'm exploring options on how to one-way sync from a table available via API to an SQL database. Does anyone have any suggestions on how to achieve this?
The data from the "Source" is often updated and should be copied to the "Destination" as the changes happen (live).
Source
Read Only table from an ERP available via an API. Webhooks on the source are not possible. Entries to this table may be created, updated or deleted. There would be approximately 150,000 entries in the table with about 1000 changes per day.
Destination
Azure MS SQL database which I have full control over.
I'm looking for best practice or any ideas on how to achieve this. There seems to be very few articles that I can find with anything helpful.
I'm open to using any tool on Azure including Logic Apps and Azure Functions but want to stay away from using 3rd party tools.
If you are trying to achieving this through logic apps, Below is the flow that you can follow.
Note: Make sure you preprocess the data before sending the data to SQL database using appropriate actions based on the type of data that you are receiving.

SSRS report with different data

I have an SSRS report where I receive a table of files which stuck in transition. In that table may be more than one user who should do some action. I want to create one report and change (using SQL query) the user for whom this table generated and send personalized reports to them. We are using MS SQL Standard 2014. So I've found a workaround on how to generate a data-driven subscription and it works fine. But reports which will send by RS still contain information for all users. I mean report which contains all people who should do some stuff is sending only for people mentioned in this report, not to all users in the base. Because of this, it's not usable and it really hard to find which files belong to you.
I'm stuck on the step: Is it possible for each iteration of running the same report to use different user names to generate personalized reports? For example except this, I want users will receive that.
For data-driven subscription I used this instruction.
I know the simple way is to create many reports for one user and trigger it, but I think it's monkey business.
Thank's to Tyron78. I tried SSIS and it 100% what I needed.
I've built a small workflow with SQL query and c# script. c# script generates pdf files and sends them to a list of users which emails users get from SQL query.

Quick way to update an excel spreadsheet and upload changes made to excel into SQL Server 2014?

We have a department that has been working in an excel spreadsheet to track a major part of our business. I'm sure this comes as no surprise to anyone, but the Excel Spreadsheet is a hot mess right now. As we are working on implementing a long term solution for this data, I need a short term solution and I am hoping you might have some recommendations. For the next two months, we need to identify problem areas in the spreadsheet (duplicate rows, missing data, etc) and as those problems are addressed in the excel spreadsheet, update the SQL server with those changes.
My thought is to schedule an SSIS to bring in the spreadsheet with changes nightly then run a stored proc to identify the problems, then run an SSRS to spit out a new excel spreadsheet for them to work on the next day.
Is there a better way to do this that isn't going to take a ton of time/resources to get up and running? I thought about Power Pivot and that would get the data out to them, but how would I upload the changes they make?
Anyway, is there a better quick solution to tide us over till we have our perm solution in place? We are using a 2014 SQL Server and Microsoft Office 2016.
Thank you!
My recommendation is to use .NET with NPOI dlls https://github.com/tonyqus/npoi, grab the data from the spreadsheet, use classes, Generics and LINQ to clean the data and the upload it to SQL Server.

Displaying Reports on SharePoint

First of all, I must say that I'm new to this. I'm a 3rd year ICT & Business student and an intern in a international company. My assignment is to create a reporting service on the company's intranet (SharePoint).
The company wants to have a section on the intranet where only managers can access. To give you an idea, lets say one of the managers wants a report like this:
"Show the names of the male interns who worked between 2012 – 2013".
And lets say the interface on the intranet is going to be like the image below.
http://i.imgur.com/eBZXP8t.jpg
Once the manager fills in the required fields and presses the button;
1.SharePoint is going to create the query,
2.SharePoint is going to ask for the data which is stored in the SQL Server,
3.SQL Server is going to send the data to SharePoint,
4.SharePoint is going to create an Excel File.
In order to achieve such a reporting system, where and how do you suggest me to start? Any links, guides etc. would be much appretiated. Even a general response would help me to understand the basics.
NOTE: Our IT department will handle the connections between the SharePoint and SQL server. I don't have to worry about that. All I need is to find out how you create a query on Sharepoint which will connect to SQL server and ask for data and display it on SharePoint (or Excel in this case).
Thanks in advance.
If you're not already, you need to use SharePoint Designer.
Create a new site in SharePoint. You'll need to manage the permissions as to prevent non-management from accessing the new site.
Open the new site in SP Designer. Bring up the Data Source Library (Data View > Manage Data Sources). There you can 'Connect to a database...'. I can't help you there. For this you'll need the DB connection string and you'll have to design a query that gets a super set of interns (to your example). You can then use filters to extract the specific intern. This also will take some exploring on your part.
You may be able to customize the SQL query using form elements but I haven't seen that done before. Typically the DB connection pulls down a data table and that is consumed by the web parts on the page.
Hope this at least gets you started...

Transfer data from SQL Server table using query to Excel and vice-versa

I want to transfer data from SQL Server table to Excel sheet using 3 tier architecture in asp.net 3.5. After user has made required changes in the Excel sheet I want Excel sheet to get uploaded and update data in the table with validation for proper data.
You could setup an SSIS package to import the data from Excel
You could either look at libraries (tons of them out there) to programmatically read and write Excel sheets, and handle it all manually.
OR: check out the SQL Server Integration Services (SSIS) - they offer neat ways to export SQL Server data into a multitude of formats (including Excel), and they also offer the route back. You can easily control and execute SSIS packages from a .NET application, too.
I can think of two methods. The first is to make an ADO connection to your SQL/Server from Excel VBA (which can be password protected). When you press a button in Excel, it either reads your spreadsheet data one record at a time and has the validation logic OR it simply uploads it with insert query to a temporary table and then you have a trigger that sees the data and processes it. That way you don't have to upload any files.
I have used ADO commands in VBA to SQL/Server and they are amazingly easy, reliable and exceptionally fast. Plenty of examples out there through Google search to find examples. It's great because you can use all kinds of Excel-specific VBA commands to build a record then update or insert it or whatever you need to do.
For security, you can limit the user (connection string and password hidden in the VBA) -- to just inserting data in a certain database so even if the password is somehow hacked from the VBA it won't do anyone any good as they can only insert.
The second method is to create an ordinary ASP upload control that accepts your Excel file when it is done. There is an event in ASP where you can run ASP.Net code when the file upload is complete. That would see the uploaded Excel file, read it through ordinary .net commands for reading Excel files (Excel automation), process it then I guess either refresh it or discard it. I do not know if there are complications running Excel automation on a server -- probably, because in essence it is running a verison of Excel.Exe on your web server (not really a good idea).
I believe you can make an ADO connection from ASP to an Excel file and do SQL queries on it. I have done that successfully but unfortunately it decides the type of the field based on the first few records and this can sometimes cause a lot of problems when reading an Excel file as a database. I suppose you could write some quick VBA to output the Excel data to CSV and upload that CSV file instead, so that nothing on the web server has to try to read an Excel file. In VBA, you can even automate the upload through SendKeys and InternetExplorer automation. I've done that and it works amazingly well. Sendkeys is the only way to populate the file upload text box for security reasons.
As you can see the first answer is the better one. That is how I would do it because that way you can also refresh your spreadsheet with new data.
I actually think you posted a very interesting question here. It's a lot easier to edit data in an Excel spreadsheet and send it back up. I have replicated a lot of that functionality using the Excel-style grid control from essentialobjects -- great software, but to emulate a spreadsheet takes a lot of coding and still it's just a Excel-like form, not a full spreadsheet.
If you are willing to put MS-Access in the middle, that can get you around a lot of these complications, but is itself an extra layer.

Resources