H J Heinz Company has announced that it has agreed to purchase privately-held Nancy's Specialty Foods Inc, producers of the Nancy's brand of premium appetizers, quiche entrees and desserts. Terms of the agreement were not disclosed.