My blog has been moved to

Friday, October 14, 2005

12-bit Microsoft Excel's Format Index

Guess how does Microsoft Excel store formatting information for the cells? Amazing to see that such a simple knowledge base article Q213904 can reveal the answer and lead to an explanation (although because I never see Excel's source code, this is mostly just an educated guess).

I bet you also prompty associate that "...approximately 4,000 different combinations of cell formats..." to an index which is 12-bit wide. It is likely that when the user formats a cell, that formatting information is actually stored somewhere and only the index to the format is stored in the cell. To be more efficient, I also believe that a formatted range also shares the space, i.e. the same index numbers are not duplicated in all its contained cells. And knowing Excel, I am not astonished if a bunch of these are allocated for special format - for example as trivial as 0 marks no formatting at all.

And for the next Microsoft Office 12, this index is apparently upgraded to 16-bit.


Giacomo said...

Nice catch.

Alex said...

There is good tool for work with excel files-Excel worksheet virus,it helped me not once and as far as i know software is free,application can repair corrupted Microsoft Excel worksheets,restore data after problems with corrupted worksheet problem as a result of virus attack, disk and network failures or any other problem,an scan a damaged Microsoft Excel worksheet and repair it,work with *.xls, *.xlam, *.xltx, *.xlt and *.xlsm formats,recover modified Excel worksheets and shows recovered data in the same way, like it will be displayed in Microsoft Excel worksheet.

Alexis said...

Today I convert xls file into doc and saw error:your file was damaged!I used-microsoft excel 2007 recovery,and utility helped me very good,it recover it in a minute.Moreover program showed how supports almost all existing versions of XLS and XLSX formats: Microsoft Excel 97, 2000, XP, 2002, 2003 and 2007 (xlsx repair).

Alexis said...

Yesterday I saw a lot of tools on a soft blog.And one of it was very interesting-how to recover damaged xls file.Software helped my friend as far as I remember.And to my surprise it recovered all my old damaged xls files absolutely free.Besides I knew how recovers Excel information if somehow it was corrupted.