Download data excel file

Spreadsheet Sample Data in Excel & CSV Formats

I have put this page together to provide everyone with data that you would come across in the REAL WORLD. Whether you are looking for some Pivot Table practice data or data that you can flow through an Excel dashboard you are building, this article will hopefully provide you with a good starting point.

All the example data is free for you to use any way you’d like. I have saved the data in both an Excel format (.xlsx) and a comma-separated values format (.csv).

What Can This Data Be Useful For?

  • Feeding Dashboards

  • Manipulating in Power Query

  • Feeding into Power BI

  • Practicing Excel Formulas (VLOOKUP Practice Data)

  • Testing Spreadsheet Solutions

  • Example Data for Articles or Videos You Are Making

Which Spreadsheet/BI Programs Can I Use This Data With?

  • Power BI

  • Tableau

  • LibreOffice (OpenOffice)

  • Tell me in the comments if there are others!

  • Microsoft Excel

  • Google Sheets

  • Apple Numbers

  • Excel’s Power Query

Company Employee Example Data

Folks in Human Resources actually deal with a lot of data. This data can be great for creating dashboards and summarizing various aspects of a company’s workforce. In this database, there are 1,000 rows of data encompassing popular data points that HR professionals deal with on a regular basis.

You can use this data to practice popular spreadsheet features including Pivot Table, Vlookups, Xlookups, Power Query automation, charts, and Dashboards.

Columns in this Data Set:

Below is a list of all the fields of data included in the sample data.

  • Employee ID

  • Full Name

  • Job Title

  • Gender

  • Ethnicity

  • Age

  • Hire Date

  • Annual Salary (USD)

  • Bonus %

  • Department

  • Business Unit

  • Country

  • City

  • Exit Date

Data Preview (Employee Records)

Download This Sample Data

If you would like to download this data instantly and for free, just click the download button below. The download will be in the form of a zipped file (.zip) and include both a Microsoft Excel (.xlsx) and CSV file version of the raw data.

Sales Force Example Data (Coming Soon!)

Columns in this Data Set:

Below is a list of all the fields of data included in the sample data.

  • YTD Sales

  • Commission Rate

  • Phone Number

  • Leader Name

  • Units Sold

  • Avg. Price Per Unit

  • Employee Name

  • Region

  • Office

  • Prospecting

  • Negotiating

  • Orders

Data Preview (Sales Team Data)

Company Financial Results Example Data

Columns in this Data Set:

Below is a list of all the fields of data included in the sample data.

  • Month

  • Year

  • Scenario (Actuals/Forecast/Budget)

  • Currency

  • Account

  • Department

  • Business Unit

  • Amount

Data Preview (Financial Data)

Website Traffic Example Data (Coming Soon!)

Columns in this Data Set:

Below is a list of all the fields of data included in the sample data.

  • Users

  • Bounce Rate

  • Keywords

  • Avg. SERP

  • Avg. Time on Page

  • Page URL

  • Page Title

  • Pageviews

  • Sessions

  • Social Media Traffic

Data Preview (Web Traffic)

I Hope This Microsoft Excel Article Helped!

Hopefully, you were able to find 1 or more data sets that you can use for your spreadsheet project. If you have any questions about the data I’ve compiled or suggestions on more datasets that would be useful, please let me know in the comments section below.

About The Author

Hey there! I’m Chris and I run TheSpreadsheetGuru website in my spare time. By day, I’m actually a finance professional who relies on Microsoft Excel quite heavily in the corporate world. I love taking the things I learn in the “real world” and sharing them with everyone here on this site so that you too can become a spreadsheet guru at your company.

Through my years in the corporate world, I’ve been able to pick up on opportunities to make working with Excel better and have built a variety of Excel add-ins, from inserting tickmark symbols to automating copy/pasting from Excel to PowerPoint. If you’d like to keep up to date with the latest Excel news and directly get emailed the most meaningful Excel tips I’ve learned over the years, you can sign up for my free newsletters. I hope I was able to provide you with some value today and I hope to see you back here soon!

— Chris
Founder, TheSpreadsheetGuru.com

Here, you can find sample excel data for analysis that will be helping you to test. You can modify any time and update as per your requirements and uses.

Excel has different types of formats like Xls and Xlsx.

What is Excel?

Microsoft Excel is used for calculation, charts data, and store calculation properly arrange data. You can store data in rows and columns. In that, you can directly calculate all data as per the formula.

It’s a spreadsheet that stores data in the calculated format.

Learn more about the Excel checkout Excel wiki page.

If you want a sample PDF for Testing then check out here and for a sample Docx file for testing click here.

Please, check out and download the sample excel file with the data below.

sample excel file for testing

Excel data for practice Xls

You can use raw data for excel practice download Xls below. raw data for excel practice download and use sample excel data for analysis.

Sample Xls file download

Xls is the older version of the Microsoft Excel file format. XLS file extension is mainly used for files saved as Microsoft Excel worksheets. This format is also referred to as Binary Interchange File Format which is (BIFF) in Microsoft’s technical documentation. Find below Xls file that contains financial-related 700 rows data. 

Icon

Sample Xlsx file download

Since 2007, XLSX has been the file format for versions. Sample XLSX file is based on BIFF (Binary Interchange File Format) and as such, information is directly stored in a binary format. It is a new version of the Microsoft Excel file format. It’s mainly used to store data of financial, student, employees.

Icon

Sample CSV file

CSV is comma-separated file. that file has .csv format and media type is text/CSV.

You can download a sample CSV file and modify as per your need and use for testing purpose.

Sample CSV file download

Icon

Check out – https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-csv-file-for-testing.csv

Excel spreadsheet examples for students

Here, you can find a sample excel sheet with student data that will help to test accordingly. Find below two different format files as per your use.

Xls file for the student

Icon

Xlsx file download for student

Icon

Excel sample data for pivot tables

You can find the pivot table sample data below and change it as per your requirements. Let us know for more updates or other details.

Sample Xls file download

Icon

Sample Xlsx file download

Icon

Sample excel file with employee data

Excel sample file download with employee data

Sample Xls file download

Icon

Sample Xlsx file download

Icon

Sample sales data excel

Sample Xls file download

Icon

Sample Xlsx file download

Icon

To meet the preferences of the many researchers you use the Fragile States Index, we are pleased to provide the data in Microsoft Excel format.

Select a year below to download the relevant excel file.

2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006

Are you looking for a sample test Excel  file with dummy data to test while implementing or developing a Web Services for the mobile app or Web App?.

Appsloveworld allows developers to download a sample Excel file with a large dummy data for testing purposes.

Always test your application in the “worst-case” to get a true understanding of its performance in the real world.

These data files are of super high quality.If you are developing software and want to test it, you will need sample data for this. We have listed good quality test data for your software testing.

Here is the collecion of raw data for excel practice.Just click the download button and start playing with a Excel  file.

If you still need Excel assignment help, please contact AssignmentCore – its MS Excel experts will handle your homework online.

Sample excel sheet with employee data

This excel sheet contains 500 test employee data.

Employee Data(.xls)

Sample sales data excel

This excel sheet contains 100 dummy sales data.

Sales Data(.xls)

Sample excel sheet with student data

This excel sheet contains 500 dummy student data.

Student Data(.xls)

Excel sample data for pivot tables

Product Pivot Data(.xlsx)

While working in MS Excel, sometimes the data gets so much that it is very difficult to see them together.In this case, the Pivot table is used.

Just understand that the pivot table shows all your data in the shortest possible place. Many skilled people of MS Excel believe that the pivot table gives you the ability to analyze the data as best as you can by using no other function.

More Sample Files for Free Download

  • Sample Excel Data for analysis
  • Sample Csv Files
  • Sample pptx files
  • Sample Excel Data

As you all know that Microsoft Office is a product of Microsoft company but do you know that in old version 2003 of Microsoft office we can not open the file of the new version 2007 while in the new version old version We can open files easily.

Difference Between .xls file and .xlsx file

.xlsx file – This is a file extension of Microsoft excel spreadsheet 2007 and its foundation is on XML and the files saved in it are in the form of text files with the help of XML.
With this spreadsheet, we can use the .xls files of the old version excel 2003. It does not support macros.

.xls file – This Microsoft excel spreadsheet has a file extension of all the versions that have come up to 2003 and its foundation is on binary data. With the help of this spreadsheet, files with .xls can be used, but new versions of the word 2007 cannot use files with .xlsx. It supports macros.

In simple words, it can be said that when Microsoft company launched excel 2003, when we save the file, in that by default .xls extension which we can open in any version of Microsoft excel.

But Microsoft launched excel 2007 after 2003, every file we save in it is saved in by default .xlsx extension, due to which we cannot open it in older versions. If you have to open the .xlsx file in an earlier version of Excel, then first you have to download Microsoft Compatibility Software for this, then you will be able to open it.

If your computer or laptop has any version above Microsoft office excel 2007 then you can save your file in any extension for which just.

Disclaimer – The datasets are generated through random logic in VBA. These are not real sales data and should not be used for any other purpose other than testing.

Other data sets – Human Resources  Credit Card  Bank Transactions   HR Analytics    

Note – I have been approached for the permission to use data set by individuals / organizations. I just want to clarify one thing. Anything published on this is completely copyright free. You can use anything from this site without any obligation. You can even call the content from this site as your own. Hope, it clarifies. There is absolutely no need to ask for permission for use. 

You can download sample csv files ranging from 100 records to 5000000 records. 5 Million records will cross 1 million limit of Excel. But 5 Million Records are useful for Power Query / Power Pivot. These csv files contain data in various formats like Text and Numbers which should satisfy your need for testing.

This data set can be categorized under «Sales» category.

Below are the fields which appear as part of these csv files as first line.

All files are provided in zip format to reduce the size of csv file. Larges ones are also provided in 7z format apart from zip format to gain further reduction in size.

The Excel containing Macro to generate these records can be downloaded from Country Sales Data Generator. The result data will be populated in Detail tab.


100 Sales Records 1000 Sales Records 5000 Sales Records 10000 Sales Records
zip, 5 KB zip, 39 KB zip, 181 KB zip, 358 KB
50000 Sales Records 100000 Sales Records 500000 Sales Records 500000 Sales Records
zip, 1.77 MB zip, 3.54 MB zip, 17.68 MB 7z, 11.10 MB
 1000000 Sales Records 1000000 Sales Records 1500000 Sales Records 1500000 Sales Records
 zip, 35.34 MB  7z, 22.20 MB  zip, 52.99 MB  7z, 33.30 MB
2m Sales Records 2m Sales Records 5m Sales Records 5m Sales Records
zip, 78.80 MB 7z, 44.79 MB zip, 196.98 MB 7z, 111.96 MB

The Excel file is a spreadsheet file format created by Microsoft for use with Microsoft Excel. You can use the file to create, view, edit, analyse data, charts, budgets and more. In this tutorial, I will show you how to use Node.js Express Rest API to download Excel file from a table in MySQL Database using exceljs.

Related Posts:
– Node.js: Upload/Import Excel file data into Database
– Export MySQL data to CSV file using Node.js
– Export PostgresSQL data to CSV file using Node.js
– Export MongoDB collection to CSV file using Node.js

Download CSV File instead:
Node.js Download CSV file example

Contents

  • Node.js Download/Export Excel File overview
  • exceljs to create Excel file
  • Technology
  • Project Structure
  • Setup Node.js Excel File Download project
  • Configure MySQL database & Sequelize
  • Initialize Sequelize
  • Define the Sequelize Model
  • Create Controller for downloading Excel file
  • Define Routes for downloading Excel File
  • Create Express app server
  • Run the Node.js Download Excel File App
  • Conclusion
  • Further Reading
  • Source Code

Node.js Download/Export Excel File overview

Assume that we have a tutorials table in MySQL database like this:

node-js-download-export-excel-file-database-exceljs-table

We’re gonna create a Node.js Application that provides APIs for downloading MySQL database table data as Excel file with following content:

node-js-download-export-excel-file-database-exceljs-file

If you send request to /api/excel/download, the server will return a response with an Excel file tutorials.xlsx that contains data in MySQL table:

node-js-download-export-excel-file-database-exceljs-result

How to do this?
You need to set the HTTP header:

"Content-disposition" : "attachment; filename=[yourFileName]" 
"Content-Type" : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

We’re gonna apply the information above later in this tutorial.

You can also find how to upload Excel File to the Node.js Express Server & store data in MySQL Database in the post:
Node.js: Upload/Import Excel file data into Database

exceljs to create Excel file

We’re gonna use exceljs to create and add data (tutorials array) into Excel file.
Let me summarize the steps for writing to Excel file:

  • create a new Workbook
  • add a new WorkSheet using Workbook.addWorksheet()
  • configure WorkSheet columns with header, key, width
  • use WorkSheet.addRows() with array of objects you want to add as parameter
  • use Workbook.xlsx.write() to write out Stream as response
const excel = require("exceljs");

let workbook = new excel.Workbook();
let worksheet = workbook.addWorksheet("Tutorials");

worksheet.columns = [
  { header: "Id", key: "id", width: 5 },
  { header: "Title", key: "title", width: 25 },
  { header: "Description", key: "description", width: 25 },
  { header: "Published", key: "published", width: 10 },
];

// Add Array Rows
worksheet.addRows(tutorials);

// res is a Stream object
res.setHeader(
  "Content-Type",
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
);
res.setHeader(
  "Content-Disposition",
  "attachment; filename=" + "tutorials.xlsx"
);

return workbook.xlsx.write(res).then(function () {
  res.status(200).end();
});

Technology

  • express 4.17.1
  • mysql2 2.1.0
  • exceljs 4.0.1
  • sequelize 5.21.13

Project Structure

This is the project directory that we’re gonna build:

node-js-download-export-excel-file-database-exceljs-project-structure

db.config.js exports configuring parameters for MySQL connection & Sequelize.
models/index.js: uses configuration above to initialize Sequelize, models/tutorial.model.js for Sequelize Tutorial data model.
excel.controllers.js: get data from database table, then uses exceljs to write out and return Excel file.
routes/tutorial.routes.js: defines routes for endpoints that is called from HTTP Client, use controllers to handle requests.
server.js: initializes routes, runs Express app.

Setup Node.js Excel File Download project

Open command prompt, change current directory to the root folder of our project.
Install Express, Multer, Sequelize, Mysql2 with the following command:

npm install express sequelize mysql2 exceljs

The package.json file will look like this:

{
  "name": "node-js-download-excel-files",
  "version": "1.0.0",
  "description": "Node.js Download/Export Excel file from MySQL database",
  "main": "src/server.js",
  "scripts": {
    "test": "echo "Error: no test specified" && exit 1"
  },
  "keywords": [
    "node js",
    "download",
    "export",
    "excel",
    "file",
    "database",
    "mysql"
  ],
  "author": "bezkoder",
  "license": "ISC",
  "dependencies": {
    "exceljs": "^4.1.0",
    "express": "^4.17.1",
    "mysql2": "^2.1.0",
    "sequelize": "^6.3.0"
  }
}

Configure MySQL database & Sequelize

In the src folder, we create a separate config folder for configuration with db.config.js file like this:

module.exports = {
  HOST: "localhost",
  USER: "root",
  PASSWORD: "123456",
  DB: "testdb",
  dialect: "mysql",
  pool: {
    max: 5,
    min: 0,
    acquire: 30000,
    idle: 10000
  }
};

First five parameters are for MySQL connection.
pool is optional, it will be used for Sequelize connection pool configuration:

  • max: maximum number of connection in pool
  • min: minimum number of connection in pool
  • idle: maximum time, in milliseconds, that a connection can be idle before being released
  • acquire: maximum time, in milliseconds, that pool will try to get connection before throwing error

For more details, please visit API Reference for the Sequelize constructor.

Initialize Sequelize

Now we initialize Sequelize in src/models folder.

Create src/models/index.js with the following code:

const dbConfig = require("../config/db.config.js");

const Sequelize = require("sequelize");
const sequelize = new Sequelize(dbConfig.DB, dbConfig.USER, dbConfig.PASSWORD, {
  host: dbConfig.HOST,
  dialect: dbConfig.dialect,
  operatorsAliases: false,

  pool: {
    max: dbConfig.pool.max,
    min: dbConfig.pool.min,
    acquire: dbConfig.pool.acquire,
    idle: dbConfig.pool.idle
  }
});

const db = {};

db.Sequelize = Sequelize;
db.sequelize = sequelize;

db.tutorials = require("./tutorial.model.js")(sequelize, Sequelize);

module.exports = db;

We’re gonna define Tutorial model in the next step.

Define the Sequelize Model

In models folder, create tutorial.model.js file like this:

module.exports = (sequelize, Sequelize) => {
  const Tutorial = sequelize.define("tutorial", {
    title: {
      type: Sequelize.STRING
    },
    description: {
      type: Sequelize.STRING
    },
    published: {
      type: Sequelize.BOOLEAN
    }
  });

  return Tutorial;
};

This Sequelize Model represents tutorials table in MySQL database with columns: id, title, description, published, createdAt, updatedAt.

After initializing Sequelize, we don’t need to write CRUD functions, Sequelize supports all of them, including retrieving all Tutorials with findAll() method that we’re gonna use in our Controller.

Create Controller for downloading Excel file

controllers/tutorial/excel.controller.js

const db = require("../../models");
const Tutorial = db.tutorials;

const excel = require("exceljs");

const download = (req, res) => {
  Tutorial.findAll().then((objs) => {
    let tutorials = [];

    objs.forEach((obj) => {
      tutorials.push({
        id: obj.id,
        title: obj.title,
        description: obj.description,
        published: obj.published,
      });
    });

    let workbook = new excel.Workbook();
    let worksheet = workbook.addWorksheet("Tutorials");

    worksheet.columns = [
      { header: "Id", key: "id", width: 5 },
      { header: "Title", key: "title", width: 25 },
      { header: "Description", key: "description", width: 25 },
      { header: "Published", key: "published", width: 10 },
    ];

    // Add Array Rows
    worksheet.addRows(tutorials);

    res.setHeader(
      "Content-Type",
      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
    );
    res.setHeader(
      "Content-Disposition",
      "attachment; filename=" + "tutorials.xlsx"
    );

    return workbook.xlsx.write(res).then(function () {
      res.status(200).end();
    });
  });
};

module.exports = {
  download,
};

Now look at the download function:
– First we use Sequelize Model findAll() method to return all Tutorials stored in the tutorials table.
– Then we use exceljs to write data to Excel file:

  • create a new Workbook
  • add a new WorkSheet using Workbook.addWorksheet()
  • configure WorkSheet columns with header, key, width
  • use WorkSheet.addRows() with array of objects you want to add as parameter
  • use Workbook.xlsx.write() to write out Stream as response

Define Routes for downloading Excel File

When a client sends request for an endpoint using HTTP request (GET excel file), we need to determine how the server will response by setting up the routes.

This is the route we need to setup: GET /api/excel/download.

Create a tutorial.routes.js inside routes folder with content like this:

const express = require("express");
const router = express.Router();
const excelController = require("../controllers/tutorials/excel.controller");

let routes = (app) => {
  router.get("/download", excelController.download);

  app.use("/api/excel", router);
};

module.exports = routes;

You can see that we use a controller from excel.controller.js.

Create Express app server

Finally, we create an Express server.

server.js

const express = require("express");
const app = express();
const db = require("./models");
const initRoutes = require("./routes/tutorial.routes");

app.use(express.urlencoded({ extended: true }));
initRoutes(app);

db.sequelize.sync();

let port = 8080;
app.listen(port, () => {
  console.log(`Running at localhost:${port}`);
});

In the code above, we initialize Express Router and call Sequelize sync() method.

db.sequelize.sync();

Run the Node.js Download Excel File App

Run the Node.js App with command: node src/server.js.
Now you can use browser or a HTTP Client to send GET request to http://localhost:8080/api/excel/download.

Conclusion

Today we’ve built a Rest API using Node.js Express to download Excel file that contains table data in MySQL database.

We also see how to use exceljs to write data to Excel Sheet, Sequelize to retrieve items in database table without need of boilerplate code.

You can also find how to upload Excel File to the Node.js Server & store data in MySQL Database in the post:
Node.js: Upload/Import Excel file data into MySQL Database

Or Download CSV File instead:
Node.js Download CSV file example

Happy learning! See you again.

Further Reading

  • https://www.npmjs.com/package/express
  • https://sequelize.org/v3/api/model/
  • exceljs

Source Code

You can find the complete source code for this example on Github.

Понравилась статья? Поделить с друзьями:
  • Download word windows 10 64 bit
  • Download converter from pdf to word free download
  • Download word programs software
  • Download com pdf to word converter
  • Download word program for free