The Lattice was a gate only shown in Versions 1.1, Version 3.0 and Version 5.2, but it is not in Version 6.23. You can not use the Lattice doors to block Onis.
In 1.1, the Lattice door is located in the cave, the key to the lattice door is located in a secret room directly underneath the cave room. You will need to shovel it out to get inside and underneath a table you should find the key in the room.
The lattice door is located in the basement.The lattice door key is inside a closet in the upper room of the basement.
In 5.2, the Lattice door is located in the Annex Basement. You need to use the plank to get to the basement.
In the study room, go to the bookshelf then obtain the grey diary and put the red diary in the bookshelf; The bookshelf will be move, revealing the Annex Basment and Lattice.