In this work, we propose a second-order version and a fourth-order version of a Cartesian grid-based boundary integral method for an interface problem of the Laplace equation on closely packed cells. When the cells are closely packed, the boundary integrals involved in the boundary integral formulation for the interface problem become nearly singular. Direct evaluation of the boundary integrals has accuracy issues. The grid-based method evaluates a boundary integral by first solving an equivalent, simple interface problem on a Cartesian grid with a fast Fourier transform based Poisson solver, then interpolating the grid solution to get values of the boundary integral at discretization points of the interface. The grid-based method presents itself as an alternative but accurate numerical method for evaluating nearly singular, singular and hyper-singular boundary integrals. This work can be regarded as a further development of the kernel-free boundary integral method [W.-J. Ying and C. S. Henriquez, A kernel-free boundary integral method for elliptic boundary value problems, Journal of Computational Physics, Vol. 227 (2007), pp. 1046-1074] for problems in unbounded domains. Numerical examples with both second-order and fourth-order versions of the grid-based method are presented to demonstrate accuracy of the method.