Turn an Excel Spreadsheet into a Bitmap Image

So I’ve created a spreadsheet program that will import a selected bitmap and use Excel as a canvas to display it.  Each cell is a pixel.  Here’s a picture of president Obama in 8-bit glory:

And here’s my current March Madness bracket in stunning 24-bit:

You can download the file below, and instructions are included on the Instructions tab.  Don’t worry, it’s not hard to use.  If you can use MSPAINT, you’ll be making your very own Excel art in no time!

For now, the code is locked, but I might make it available later after I’m sure it’s error free. Speaking of which, there are a few problems you may (but hopefully won’t) run into:

1.  The picture shows up discolored and slanted.  While I’m fairly certain that I’ve fixed this issue, I admit that I am by no means perfect.  When bitmaps are saved, they are “padded” in the file to make their height evenly divisible by four.  The program should compensate for this padding, but if it doesn’t — again, I’m fairly certain this issue is resolved — just resize the bitmap it to the nearest number evenly divisible by four.  (That number is at most three digits away.)

2.  Too many Different Cell Formats error.  Sometimes you’ll get this annoying popup.  If that happens, try zooming in on the canvas screen first and then reuploading your file.  If that doesn’t work, either crop the original image or resize to a smaller one.  Or, if you are uploading a 24-bit bitmap, consider resaving as an 8-bit and then reuploading.

If you find other issues, please, let me know.  It would be great help.

Also, this is best used with Excel 2007 and above.  It will work in 2003, but remember that 2003 has a column size limitation, which may cause in an error for files that are too large.  If you are concerned, smaller is better: resize or choose to save in the 8-bit format.  When you are done, remember to save as in the Excel 2007 file type (check to see if you are in compatibility mode) so that you get all the columns required to display your most productive spreadsheet, ever.

I’m releasing this now because I’ve been sitting on it for way, way too long.  I was hoping I’d come up with some real, professional use for it, but I haven’t thought of anything yet.  For a moment, I was trying to apply a Hough Transform to the bitmaps to see if I could take images and turn them into cool free form shape, but this proved too taxing for Excel.  I also made an attempt at Eigenfaces which ended ridiculously.  So if anyone out there has some good ideas, please email me and we’ll work together.

Lastly, if you like what you see and choose to host a spreadsheet made with this program (or screen capture of one) on your blog or website, I’d be so grateful if you mentioned this blog!  Have fun.

File
Bitmap to Excel.xlsm

Advertisements

3 thoughts on “Turn an Excel Spreadsheet into a Bitmap Image

  1. Anonymous

    Hi Jordan,Really like this workbook. One suggestion – whilst it's nice to watch the picture build up would it be possible to turn off the screenupdating to speed things up?Regards,Dave Bazley

    Reply
  2. Jordan Goldmeier

    Dave,There was something viscerally appealing to me to watch each cell get painted line-by-line, but I realize it slows things down, especially for large pictures. If you send me an email (jpo645 at gmail), I can send you an updated version that turns off screenupdating.

    Reply
  3. Oscar E.

    Hello Jordan! Nice blog! I know this entry has quite some time. I was wondering. Is it possible to do the other way around? Lets say I mod one or several pixels and I wanted to generate an image file with the cells on the screen.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s