How Office Excel stores data in .XLSX, DOCX, PPTX file

How to guide

Microsoft has introduced a new default file format in Office 2007 called .xlsx, docx , and .pptx for Excel, Word and Power Point respectively. The letter X appended to each file extension as the data stored in these files in the form of open XML format.  The earlier version of Microsoft Office uses binary file to stores both data and related formatting information. The open XML format is absolutely isolated where data and related formatting details stored in XML files separately. In other words, open XML file is actually a .zip file which contains both data and formatting related files in it.

How Office Excel stores data in .XLSX file

Platform: Windows
The key benefit of using Open XML format is Compact. The files are compressed automatically up to 75 percent. In this article, we will discuss on how Open Office XML used in Microsoft Office Excel .XLSX file to store the text data and related formatting information.

1 Open Microsoft Office Excel application and create a simple spread sheet with below contents. Save it as Fruits.xlsx
How Office Excel stores data in .XLSX file
2 Open file location and rename this file as Fruits.zip.
How Office Excel stores data in .XLSX file

3 Extract Fruits.zip file to some folder. Keep the folder name as Fruit for better understanding.
How Office Excel stores data in .XLSX file
4 Open the Fruits folder which contains files and some folders in it. Folders are _rel, docProps and xl. File is [Content_Types].xml
How Office Excel stores data in .XLSX file
5 The directory xl stores the Excel user data and formatting information.

How Office Excel stores data in .XLSX file

  1. The formatting details stored in theme1.xml under \theme directory and styles.xml.
  2. The user data stored in sharedstring.xml.
  3. The workbook.xml defines how many work sheets created in Fruits.xlsx file (Sheet1, Sheet2, Sheet3).
  4. Finally, the worksheets folder contains work sheet files which mapping details for each worksheets created. Each worksheet (Ex. Sheet1.xml) is mapped with sharedstring.xml.
Open the sharedstring.xml and see how fruit names and colour are stored in XML file.
How Office Excel stores data in .XLSX file
Open the sheet1.xml and see the mapping details with respect to sharedstring.xml file.
How Office Excel stores data in .XLSX file

– Article ends here –

Related Tags:

Software engineer by profession, founder of troubleshottyourself channel and enthusiastic blogger. Love to write articles on new technology, programming,

Share this: