The chemical reactions and pathways involving cellulose, a linear beta1-4 glucan of molecular mass 50-400 kDa with the pyranose units in the -4C1 conformation, as part of the organization and biogenesis of the cell wall.