Worlds Colliding: Convert a Digital Photo into an Excel Spreadsheet

By David Ringstrom, CPA
 
In an unlikely mash-up, Matt Parker of Think Maths offers a free tool that converts a digital photo of your choice into an Excel spreadsheet. According to the website, "digital photographs are actually just spreadsheets. When you take a photo, your camera measures the amount of red, green, and blue light hitting each pixel, ranks them on a scale of 0 to 255, and then records those values as a spreadsheet." Parker's website is able to extract said values from a digital photo, record the numeric values in worksheet cells, and then use Excel's Conditional Formatting feature to recreate the photograph.
 
If you have Excel 2007 or later, you can try the technique yourself:
 

Figure 1: Any digital photo can be converted into an Excel spreadsheet.
 
Note: The resulting spreadsheet is an XLSX file, which can be opened in Excel 2003 and earlier if you have the Office Compatibility Pack installed. Don't bother doing so, as all you'll see is a bunch of numbers  no photograph.  Parker relies on a feature only available in Excel 2007 and later.
 
At first, your photo will look much like Figure 2, but if you zoom out, you'll be able to see your photo, as shown in Figure 3. There are several ways to zoom an Excel spreadsheet:
  • If you use a mouse with a scroll wheel, hold down the Ctrl key while you spin the scroll wheel. 
  • Choose Zoom on the View tab and then specify 10 in the custom field.
  • Use the Zoom Slider in the lower right-hand corner of your screen, as shown in Figure 4. You can toggle the Zoom Slider on or off by first right-clicking on Excel's Status bar at the bottom of the screen.
 

Figure 2: You'll only see a tiny portion of your photo until you zoom out.
 
Figure 3: The author's headshot in Excel spreadsheet form.
 
Figure 4: The Zoom slider appears in the lower right-hand corner of most Excel screens.
 
Once the numeric data from a digital file has been written to a spreadsheet, recreating the photograph is a simple matter of using Excel's Conditional formatting feature to color the cells. To see how this works:
  • Click on any cell within your photo.
  • Choose Conditional Formatting from the Home tab and then choose Manage Rules.
As shown in Figure 5, you'll see the technique relies on the Graded Color Scale, where numbers between 0 and 255 correspond to specific shades of color. Thus, by writing the numerical data from a digital photograph, Parker is able to reconstruct any digital photo within an Excel spreadsheet. 
 
Figure 5: A conditional formatting feature in Excel converts numbers between 0 and 255 to shades of color.
 
Hat tip to Bill Jelen, aka Mr. Excel, for bringing the Think Math website to my attention.
 
Read more articles by David Ringstrom. 
 
About the author:

David H. Ringstrom, CPA heads up Accounting Advisors, Inc., an Atlanta-based software and database consulting firm providing training and consulting services nationwide. Contact David at david@acctadv.com or follow him on Twitter. David speaks at conferences about Microsoft Excel, and presents webcasts for several CPE providers, including AccountingWEB partner CPE Link.

 

You may like these other stories...

Russia races to dodge sanctions by adapting law to FATCARussia is in a race against the clock to adapt its laws to the Foreign Account Tax Compliance Act (FATCA) and save its banks from financial sanctions, Peter Hobson of...
The following list highlights 10 apps that that may be of interest to you, your clients, or your clients' clients. They were featured during a session of AWEBLive!, the 12-hour CPE marathon, and presented by Gregory L....
I am a recent MS Accounting degree graduate and I am looking into a programming/IT related career. Anyone here have experience or know any accountants that diverted their careers into IT/Programming/System design, etc?...

Upcoming CPE Webinars

Apr 24
In this session Excel expert David Ringstrom, CPA introduces you to a powerful but underutilized macro feature in Excel.
Apr 25
This material focuses on the principles of accounting for non-profit organizations' revenues. It will include discussions of revenue recognition for cash and non-cash contributions as well as other revenues commonly received by non-profit organizations.
Apr 30
During the second session of a four-part series on Individual Leadership, the focus will be on time management- a critical success factor for effective leadership. Each person has 24 hours of time to spend each day; the key is making wise investments and knowing what investments yield the greatest return.
May 1
This material focuses on the principles of accounting for non-profit organizations’ expenses. It will include discussions of functional expense categories, accounting for functional expenses and allocations of joint costs.