Here is my code for creating a maze in Excel. It is actually fairly easy to make a true maze without any blocked sections. Basically, it grows out the walls from the edges. As long as they don't connect with other walls, you'll end up with a graph where every space can be visited from every other space.
Askimet doesn't seem to like me posting code, so I'll just describe the algorithm.


Create a square of x rows and y columns. x and y must be odd numbers.


Put a W in each cell of row 1, row x, column  1, and column x.

For each cell whose row and column is even, put an S.

Put an O in all the other cells.

W = Wall of maze

S = Space in maze

O = Open, not processed

P = Possible next wall. We will determine these soon.



All cells whose row and column are even has to be a space. All cells whose row and column are odd will be a wall. I will call those pillars. The rest of the cells have an odd row and even column or even row and odd column. I will call them partitions. The algorithm will repeatedly pick another random partition to put between pillars in the maze.

Initialized maze.
WWWWWWWWWWW
WSOSOSOSOSW
WOOOOOOOOOW
WSOSOSOSOSW
WOOOOOOOOOW
WSOSOSOSOSW
WOOOOOOOOOW
WSOSOSOSOSW
WOOOOOOOOOW
WSOSOSOSOSW
WWWWWWWWWWW

Possible finished maze.
WWWWWWWWWWW
WSSSSSSSWSW
WWWWWWWSWSW
WSWSWSSSWSW
WSWSWWWSWSW
WSSSSSSSWSW
WSWWWSWSSSW
WSWSSSWSWSW
WSWSWWWSSSW
WSWSWSSSWSW
WWWWWWWWWWW

Above maze without the S spaces for clarity.
WWWWWWWWWWW
W       W W
WWWWWWW W W
W W W   W W
W W WWW W W
W       W W
W WWW W   W
W W   W W W
W W WWW   W
W W W   W W
WWWWWWWWWWW



Note that the pillar and partition cells will initially be marked as open (O). An open partition is an undetermined cell that will be either a wall (W) or space (S). An open pillar is a pillar that has is not next to a wall.

While there are still open spaces (O), loop.
  For each partition cell in the maze
    if the partition cell has two walls next to it, mark it as a space (S)
    if the partition cell has one wall (W) next to it, mark it as possible (P)
    otherwise leave it as Open (O)
  end the for loop
  Pick a random P and change it to W
End the loop.

