Catalog

How to Create a Query in Excel A Step-by-Step Guide

October 20, 2023 3.4K views

If you've ever grappled with importing and transforming data in Excel, Query is your secret weapon. It streamlines data handling, yet many struggle to grasp its power. So, how do you harness this tool's potential with ease? In this guide, we unravel the simplicity of creating an Excel query, making your data tasks a breeze.

Part 1. Understanding Power Query in Excel

power query


What is Power Query in Excel?

Power Query is an Excel add-in that allows you to connect, transform, and combine data from various sources, such as files, databases, web pages, and more. You can use Power Query to create queries that extract and shape the data according to your needs, and then load the results into Excel worksheets or data models. Power Query also lets you refresh your queries whenever the source data changes, so you can always have the latest and most accurate information.

Importing data with Power Query in Excel is a straightforward process. You can access a wide range of data sources and formats using the "Get Data" command from the Data tab. Here's how to import your data:

  1. Access Data Sources: From the Data tab in Excel, click on the "Get Data" command. This opens a menu with various data source options.

get data

  1. Single File Import: You can import data from a single file, including Excel workbooks, Text or CSV files, XML, and JSON files. Simply select the file type you want to import and locate the file on your computer.

 simple file

simple file

  1. Multiple File Import: Power Query also allows you to import data from multiple files located within a specific folder. This is useful when you have several files with similar data structures.

 folder

folder

  1. Database Connections: You can connect to various databases, including SQL Server, Microsoft Access, Analysis Services, Oracle, MySQL, and more. Enter the required connection details to access the database.

 database

database

  1. Microsoft Azure and Online Services: Power Query supports data retrieval from Microsoft Azure and online services such as SharePoint, Microsoft Exchange, Dynamics 365, and even social media platforms like Facebook and Salesforce.

online

online

azure

azure

  1. Other Data Sources: You can import data from various other sources like tables or ranges within the current workbook, web pages, Microsoft Query, Hadoop, OData feeds, and databases using ODBC and OLEDB connections.

other source

other source

Part 2. How to Create a Query in Excel

#1.Create a Query from Imported Data

Step 1: Open Excel.

Step 2: Go to the Data tab.

Step 3: Choose "Get Data" > "From Other Sources" > "From Microsoft Query."

select data

select data

Step 4: Select your data source, like the "Activate" and enable Query Wizard.

active

active

Step 5: Enter your SQL Server login credentials.

Step 6: Configure database options and choose your Acctivate Database.

choose your Acctivate Database.

choose your Acctivate Database.

Step 7: Follow the Query Wizard to select views and fields to import.

select views

select views

select view

select view

Step 8: Set filters, sorting order, and finish to display data in Excel.

 filter

filter

 import data

import data

 result

result

#2.Create a Blank Query

Step 1 Select the Data tab.

data tab

data tab

Step 2 Choose "Get Data" and then "From Other Sources."

get data

get data

 from other source

from other source

Step 3 Select "Blank Query."

blank query

blank query

 result

result

Part3.Best Alternative——WPS Office

 wps office

wps office

WPS Office is a robust office software solution known for its stability and modern design. It boasts a wide range of features, making it a versatile tool for various office tasks, including text processing, table creation, slide design, graphic image editing, and straightforward database management. One of its noteworthy advantages is its ability to seamlessly handle Excel links, instilling trust in its users.

Pros of WPS Office:

  1. Rich Template Store: WPS Office offers a diverse selection of templates, enhancing your document, presentation, and spreadsheet creation.

  2. Rich Functions: The software provides comprehensive functions, ensuring you have the tools you need for efficient office work.

  3. Lightweight: WPS Office is resource-efficient, ensuring smooth performance even on less powerful devices.

  4. Support for Online Documents: You can easily work on documents stored in the cloud, facilitating collaboration and accessibility.

  5. Safe and Stable: With a focus on reliability, WPS Office is a dependable choice for your office needs.

My experience with WPS Office has been excellent. Its intuitive interface, extensive feature set, and compatibility with various file formats have significantly improved my productivity. The software's stable performance and support for collaborative work make it a compelling alternative to other office suites.

How to download WPS Office for free?

Step 1: Navigate to the official WPS Office website at https://www.wps.com/download/.

Step 2: Select the WPS Office version that matches your operating system (Windows, Mac, Linux, Android, or iOS).

select option

select option

Step 3: Click on the "Free Download" option.

Step 4: The download will commence, and you'll acquire the WPS Office installation file.

download file

download file

Step 5: Once the download is complete, locate the downloaded file on your computer or mobile device.

Step 6: To install WPS Office, open the downloaded file and follow the on-screen instructions.

 instruction

instruction

Trustpilotstars4.8
WPS Office- Free All-in-One Office Suite
  • Use Word, Excel, and PPT for FREE, No Ads.

  • Edit PDF files with the powerful PDF toolkit.

  • Microsoft-like interface. Easy to learn. 100% Compatibility.

  • Boost your productivity with WPS's abundant free Word, Excel, PPT, and CV templates.

5,820,008 User
avator
Algirdas Jasaitis
logo

FAQs

How do I create a SQL query in Excel?

Creating a SQL query in Excel involves using the "Execute SQL" button on the XLTools tab to open an editor window with a tree view of available tables. You can select tables or specific fields, which automatically generates a SQL SELECT statement. Decide where to place the query output, and click "Run" to view the results.

How do I create a Web query in Excel?

For creating a Web query, navigate to your desired reporting table in the Search Ads 360 UI. Click the download icon, select "Create web query," configure settings, and obtain the web query URL for use.

Summary

In 2023, Excel's Power Query is your go-to tool for effortlessly extracting valuable insights from data. It simplifies data handling, ensuring that tasks are a breeze. Understanding and using Power Query is crucial, and this guide breaks it down step by step. You can import data seamlessly from various sources, making data manipulation a straightforward process.

WPS Office, a stable and modern office software suite, emerges as a top alternative. It excels in handling Excel links, instilling trust in its users. With a rich template store, comprehensive functions, and lightweight performance, WPS Office proves to be a reliable choice for various office tasks. Downloading WPS Office is a straightforward process from their official website. It's compatible with Windows, Mac, Linux, Android, and iOS, catering to a wide user base.


15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.