This is the second article from the Product perspective Excel series.
Preface: From the product perspective excel-series 0-Why pay attention to the essence of Excel
This article does not accept unauthorized reprint, if you need to reprint, please contact me first, thank you very much.
1. How Excel Works
In the preface, we have roughly talked about why we should write this article, as well as its overall structure. And from this chapter, we'll take a quick look at what Excel is and how it works.
From the definition of Excel, it is a spreadsheet software for processing data. When we open Excel, we see a large square lattice, which is the main object that Excel handles-- table (spreadsheet)
basically all of Excel's features revolve around tables . There are cells for storing data, an Excel built-in function to count and calculate cell data, a column or row of tables for filtering and sorting, and a variety of data statistics and visualization functions.
So, do you ever wonderhow Excel stores and calls the data when it comes to an Excel table when you understand that the object it's dealing with is a table and its data? It will also be in tabular form, stored in the computer so that we can call it? Do developers who develop Excel software, in their design, draw one after another in the background, waiting for us to fill in the squares?
The answer to the above-mentioned conjecture is negative.
For people who develop Excel, the computer is not so colorful.
That one after another, is the programmer wrote a lot of lines of code, the various functions of the combination of the final result of the formation. When you go back to the bottom of the computer, you will find every time you operate a square lattice, behind a line of specific code to explain your operation, converted to a string of 01010101001 to the computer, let it control the micro-circuit switch, and ultimately give back to the content you want. And these codes, 0000111100010101 or so, are plain text.
So we can say that excel in the process of operation, in the background of the computer, is a variety of plain text information in the transmission and operation. Because of this, when we want to understand how Excel works, we can understand how these plain text information is stored and parsed, a glimpse into the workings of this program and the nature of Excel.
So back to our just question, How is the data stored and called in Excel , which can also be explained from a plain text perspective.
Let's take a look at the information in this page:
Introduction to Microsoft Office Open XML file format:
Https://msdn.microsoft.com/zh-cn/library/ms406049%28v=office.12%29.aspx
Briefly summarize the contents of the above page, that is:
The Office family of products, which are stored in the Office Open XML file format, are compressed.
Our daily use of a separate xlsx file, in fact, a compressed file. They compress a number of plain text files in XML format, and Excel reads the information of those compressed files, and finally shows us a fully graphical spreadsheet.
For example, when we have an Excel file, we can change its suffix name from. xlsx to. zip, and a folder will appear when the right key is extracted.
There are _rels, Docprops and XL three folders in the folder.
Most of the main contents of this Excel file are stored in the XL folder. If the theme folder contains the Excel theme settings, the sharedstrings contains the information in each cell, and the Worksheets folder records how each sheet calls each other. These are stored in the disk in XML text format.
For example, if we were to enter the following string in a work table:
What we see in Excel is a neat table, but in Xl\sharedstrings.xml, these characters are stored in this form of text:
Excel will later use a variety of code to read the plain text files in these XML, and finally in a graphical interface in a neat spreadsheet form, the text displayed.
So in fact, thestore of information in Excel, is to put a variety of information tag, in the form of plain text stored in the XML file. And when we need to read the information, it decodes the plaintext into the information we see in the spreadsheet by adjusting the relationship of the text.
We are going to understand how Excel works, in fact, to understand what these plain text messages are and how they are compiled. In this way, we can more easily touch the essence of Excel, understand how it is designed, what will be the function.
So, we finally brought out the focus of this series of tutorials: from the essence of Excel design, to learn Excel.
We will follow the information represented by these plain text as well as its classification, one by one, including: cell information storage, the application of Excel function, the special existence of the chart. Please look forward to it.
Extended reading:
1, Excel is developed in C + + language: https://www.zhihu.com/question/20378143
2, the computer is used 0, one to store data related reading:
An explanation on the blog: http://c.biancheng.net/cpp/html/2839.html
"Introduction to Computer Science", version 11, chapter 1th
3, wiki on the definition of Excel: https://en.wikipedia.org/wiki/Microsoft_Excel
4. Microsoft Office Open XML file Format description:
Https://msdn.microsoft.com/zh-cn/library/ms406049%28v=office.12%29.aspx
Also, as mentioned in the previous article, the Office Open XML file format has brought too much convenience to people who develop Excel. We can also search the people who operate excel in other languages, how to use this file format. If you are interested, you can expand your reading first.
What else can't be done? --Read and write one of the Excel series articles in C #:
Http://www.cnblogs.com/jaxu/archive/2012/05/09/2491096.html
Reading Excel 2007 files with XmlReader
Http://www.cnblogs.com/skyivben/archive/2007/09/23/903582.html
Public Number:
[Learn how Excel 01]-excel works from a product perspective