How to Reduce a Large Excel File

Updated on October 20, 2018
klanguedoc profile image

Kevin is Software Developer with 20 years experience designing and building business intelligence and system integration solutions.

Excel 2013 and earlier versions like Excel 2007 and 2010 or later versions like 2016 is a great tool for data analysis but can grow in size quickly. Another problem is when you are connected to a database and you reduce the size of a query in the database view; the reduction in data is not reflected in Excel as the latter keeps an internal table of the data, especially when working with Pivot Tables that are linked to the database.

There are several techniques that you can use to reduce the size of an overbloated Excel file that I will review in this reference article.

Reducing Worksheets


Excel copies and stores data for each worksheet that is created in an Excel workbook. Even if you use external data from another spreadsheet or database, each sheet will have a copy of the data. You should review the different worksheets in a workbook to see if some can be deleted or combined to reduce space.

Eliminating excess worksheet, thus data bloat, will greatly reduce the size of your file and increase performance. Also be careful about links to other worksheets with a lot of formulas or to other worksheets in external workbooks. While this won't necessarily change the size of the workbook, it will impact performance which can be as problematic as bloated data.

Figure 1 : Perform a Save As
Figure 1 : Perform a Save As

Converting to Binary


Another technique that can substantially reduce the size can be used in conjunction the previous technique of consolidating and deleting old worksheets is to convert the Excel file to a binary format which is represented by the file extension xlsb. You won’t lose any functionality and you will actually gain some performance.

To convert a 2007, 2010, 2013, 2016 or greater Excel file to a binary format, follow these simple steps.

  • With the Excel file open
  • Click on the File tab (Fig 1)
  • Select “Save AS” from the Tab menu
  • In the Save As dialog select the “Save As Type” dropdown field and select the “Excel Binary Workbook (*.xlsb)” option from the list of values. See figure 2.
  • Click Save


You'll notice a huge size file savings and an increase in performance by using the binary format. However, the trade off you won’t have access to the XML files in the Xlsx archive. See Figure 3.

Figure 2 : Save As Excel Binary Format (*.xlsb)
Figure 2 : Save As Excel Binary Format (*.xlsb)
Figure 3 : Binary versus XML File Size Example
Figure 3 : Binary versus XML File Size Example

Compacting Excel File


While not directly related to Excel, Windows has a feature that will compact the size of a file, including Excel.

To compact your Excel file, locate the your file via Windows Explorer

  • Right click the file
  • Select Properties from the context menu
  • Next Select the Advanced button (see Figure 4 below)
  • Finally select “ compress contents to save disk space...”

Figure 4: Configuring File Compress in Windows
Figure 4: Configuring File Compress in Windows

Storing the data in PowerQuery

A feature that was introduced in Excel 2007 is the PowerPivot and eventually the PowerQuery. With 2007 and 2010 versions of Excel, you can/could download a free download software/plugin for Excel that is called PowerPivot. In 2013, this technology become integrated in Excel and as of Excel 2016, it is called Get & Transform.

Where you can store up to 1 millions rows in a worksheet in Excel 2007 or 2010 (I wouldn't advise you tor try otherwise you will start getting "no resources available..." error messages), it was and still is unpractical because of performance degradation, instead you can store you data in PowerPivot which can easily handle up to 100 million rows without breaking a sweat. PowerPivot uses an API to create a tabular dataset the same way that SQL Server Analysis Services uses Tabular Data Models instead of OLAP and Power BI as well.

You import the data into PowerPivot the same way you do with Excel. You can also use DAX and PowerQuery Language to transform your data before using it in Excel. Once you data is ready, click on the Excel button in the PowerPivot menu and return to Excel. You data will be visible in Excel and you can work with like any other data in in Excel, except that data will actually in the PowerPivot and you will be accessing the data via a MetaData API. This is very powerful for data wrangling and data analysis.

In Summary

These techniques can be used separately or together to help you reduce the file size of your Excel files.

Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      Anas A.khan 

      3 weeks ago

      Thanks ): very productive.

    • profile image

      azarrr 

      7 weeks ago

      superb excellent

    • profile image

      KALAI SELVAN 

      7 weeks ago

      AMAZING EXPERINCE... THANKS A LOT

    • profile image

      sonia 

      2 months ago

      Thanks.Awesome idea

    • profile image

      Tuhin 

      12 months ago

      I have 150 mb size excel file. After converting xlsb the file size converted in 95 mb. I want to more reduce the size of the file. Is that possible?

    • profile image

      ALI HAIDER 

      15 months ago

      Gr8 !!I have 29 MB of file size(XLSB) how to compress into 6MB of file.its a amazing experience.Thanks..

    • profile image

      tyatith 

      2 years ago

      i have try but still bloating file not reduce, but i notice if i use the file more often the size of file bigger and can't reduce, not like Access file which have option to compact size when close, so the file not so much increase.

    • profile image

      excel file 

      2 years ago

      I have 13 mb of file size(XLSB) how to compress into 4mb of file

    • klanguedoc profile imageAUTHOR

      Kevin Languedoc 

      4 years ago from Canada

      You should be able to do that my converting your file to a binary format (xlsb). Because the standard xlsx is simply an archive of XML documents. Also you need to keep in mid that Excel makes a copy of you data in each sheet that you create. You could also try creating the pivot table in the same sheet (if possible) or create a new workbook and use your original workbook as a data source.

    • profile image

      cat 

      4 years ago

      My excel file is 207mb i would like to copy out my database to a new sheet to do pivot table but it keep prompting me the message;

      Excel cannot complete this task with the available resources. Choose less data or close other applications.

      The problem is i have close all other applications it still can't

    • klanguedoc profile imageAUTHOR

      Kevin Languedoc 

      6 years ago from Canada

      Thanks. I am working on new Excel topics. Anything you would like to read in particular?

    • smga22 profile image

      smga22 

      6 years ago from Dhaka, Bangladesh

      Excellent Hub. Looking forward to get more from you.

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, turbofuture.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://turbofuture.com/privacy-policy#gdpr

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)