Our use of cookies

We use cookies to tailor your experience, gather analytics, and provide you with live assitance. By clicking "Accept" or continuing to browse our site you agree to the use of cookies. For more details please read our Cookie Policy.

Generate Excel Charts and Reports from live SharePoint list data

In this blog, I will show you the best way of creating a chart in Ms Excel on live data coming from SharePoint lists. We will start off by looking at the lists which we are going to use for this demo and followed by how we can use SQList to synchronize data between SharePoint Lists and SQL Server database and to finish things off, we will look at how to generate our reports and charts much faster.

Scenario

Create a bar chart in Ms Excel which shows the total price and total current stock of products by Category Group.

If you would rather watch a video, this tutorial is also available on our YouTube channel at: https://youtu.be/iuAMjtb5vFQ

SharePoint Lists

For this demo, we will use three custom lists with some data in SharePoint.

Product list

  • This list contains all the products data.
  • Columns
    • Title (Single Line of Text)
    • Unit Price (Money)
    • Current Stock (Number)
    • Category ID (lookup column linked to category list).

Category List

  • It is a custom list which contains data of all the product categories.
  • Columns
    • Title (Single Line of Text)
    • Category group ID (lookup column linked to Category groups list).

Category Group List

  • It is a custom list which contains data of all the product category groups.
  • Columns
    • Title (Single Line of Text)

Step-1: Create a Database in SQL Server

First off, we need a database that will be used for replicating the data coming from SharePoint lists.

  • Open SQL Server Management Studio and create a new database named “ProductsReportdemo”.

 

Step-2: Replicate and Synchronize data to Database

Secondly, we need to replicate the data from SharePoint lists into SQL Server database. We will use SQList to achieve that.

  • Open SQList Manager and click on “Create a new replication”.

  • Create a new SharePoint connection, enter the connection name and Table prefix
  • and select the SharePoint site which contains the lists and clicks next.

  • Next step is to select the replication lists, we will select the 3 lists which are going to be used for this exercise i.e. Product, Category and Category Group.

  • Next, enter the details for the destination SQL database connection which is the database we created earlier.

  • Last step is to give this replication a name, and keep the default options as checked and then click finish.
  • Once the replication is created, SQList replication service will start off for synchronizing the SharePoint lists and SQL database.
  • Once the service is started, you will see that some tables have been created in the destination database including the tables for the lists which we selected.

Note: SQList will keep the database in-sync with the SharePoint lists which means any updates made in the lists will be replicated in this database as well.

  • In order to generate a report in the report builder, we will need a SQL view for the dataset.
  • So, Let’s create a view that includes the Product category title, Sum of UnitPrice and Sum of CurrentStock from Product.

Step-3: Generate a Chart in Excel

  • Let’s open up Ms Excel.
  • Go to Data tab and click on Get Data and select From SQl Server Database.
  • Enter the Server and Database name which we created for the demo

  • This will open the data navigator, which shows all the tables and views.
  • Select the SQL view “TotalByGroup” in the navigator.

  • Click on Load, this will load the data table in our Excel Sheet.
  • Next step is to insert the report, so go to the insert tab and select the 3D bar chart from the Charts section.
  • To select the data for the chart, click on Design Tab and then click on Select Data.
  • Select the table which will populate the data source in the report.

  • This will populate the chart with the data we selected.

  • Now to test the synchronization, let’s go to SharePoint and add a new item in Products list. Lets add a product that belongs to  Category Group “Digital Products” and set 2000 as stock. It will take few seconds to synchronize in our database, Once you refresh the report you will see that our data table and chart has been updated.

Conclusion

To summarize, today we saw how to generate a bar chart in Excel. We used SQList for replicating and synchronizing data coming from SharePoint lists so the chart reflects changes made to SharePoint Lists.

Latest articles

My Impressions of Microsoft Flow: A Developer’s Perspective

13 May 2024

Recently, I had the opportunity to explore Microsoft Flow, a tool that promises to facilitate the rapid development of software applications through […]
[read article]

Power Pages Unleashed: Creating Dynamic Websites with Microsoft Copilot

28 Apr 2024

In our latest tutorial, we delve into the capabilities of Microsoft Copilot, with a focused exploration of Power Pages. Our aim? To showcase how […]
[read article]

Harnessing the Power of Microsoft CoPilot in Power Automate Flows: A Comprehensive Tutorial

25 Mar 2024

In the ever-evolving landscape of technology and business automation, Microsoft has introduced a game-changer that is set to revolutionize how we […]
[read article]

Embracing AI: Transforming Jobs and Unlocking New Opportunities (Claude 3 Opus version)

18 Mar 2024

The rapid advancements in Artificial Intelligence (AI) have sparked both excitement and fear among workers worldwide. Many people are concerned that […]
[read article]

The Evolution of Work in the Age of AI: A New Era of Collaboration (ChatGPT 4 version)

18 Mar 2024

In the annals of human progress, pivotal inventions such as the steam engine, the tractor, and the internet have revolutionarily altered our way of […]
[read article]

AxioWorks Newsletter February 2024: Partnerships, Upcoming SQList Update, and Summit Invitation

27 Feb 2024

Hello Reader, This February has been pivotal for AxioWorks as we’ve focused on laying strong foundations for the year. Here are the key […]
[read article]

How AxioWorks SQList Aligns With the Priorities of Software Buying Decision Makers

26 Feb 2024

As outlined in the “2024 Global Software Buying Trends” report by Gartner Digital Markets, the criteria that predominantly influence […]
[read article]

Maximising Power BI Reporting from SharePoint: The Strategic Advantage of AxioWorks SQList over Native Connectors

15 Feb 2024

In today’s data-driven environment, making informed decisions rapidly can offer a significant competitive edge. This is where Power BI comes […]
[read article]

AxioWorks Newsletter January 2024: A Promising Start to the New Year!

29 Jan 2024

Hello Reader, We hope this newsletter finds you well and thriving. At AxioWorks, we are embracing the new year with great enthusiasm and are […]
[read article]

Exciting New Partnership and Innovative SharePoint Tools from AxioWorks and Lightning Tools

17 Jan 2024

AxioWorks is excited to announce a strategic partnership with Lightning Tools, a leader in creating innovative SharePoint components. This […]
[read article]

Get SharePoint and SQL news to your inbox

Stay up-to-date with industry news and trends, SQL and SharePoint innovations and all the latest from AxioWorks by subscribing to our monthly newsletter.

Subscribe to the AxioWorks newsletter

*