Article 5NFJD How to make a chessboard in Excel

How to make a chessboard in Excel

by
John
from John D. Cook on (#5NFJD)

I needed to make an image of a chessboard for the next blog post, and I'm not very good at image editing, so I make one using Excel.

There are Unicode characters for chess pieces- white king is U+2654, etc.-and so you can make a chessboard out of (Unicode) text.

 

I placed the character for each piece in an cell and changed the formatting for all the cells to be centered horizontally and vertically. The following is a screenshot of the Excel file.

chessboard2.png

The trickiest part is getting the cells to be square. By default Excel uses different units for height and width, with no apparent way to change the units. But if you switch the View to Page Layout, you can set row height and column width in inches or centimeters.

Another quirk is that you may have to experiment with the font to get all the pieces the same size. In some fonts, the black pawns were larger than everything else [1].

You can download my Excel file here. You could make any chessboard configuration with this file by copying and pasting characters where you want them.

When I tested the file in Libre Office, it worked, but I had to reset the row height to match the column width.

Related posts

[1] Thanks to a reply on twitter I now understand why black's pawn is sometimes outsized. The black pawn is used as an emoji, a sort of synecdoche representing chess. That's why some fonts treat U+265E, black knight, entirely differently than U+265F, black pawn. The latter is interpreted not as a peer of the other pieces, but as the chess emoji. See the chess pawn entry in Emojipedia.

The post How to make a chessboard in Excel first appeared on John D. Cook.vU50uZ7ZIsA
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments