Update and format template table