X-Ray absorption near-edge structure and extended X-ray absorption fine structure spectroscopies have been used to study the electronic and structural properties of Ca-doped Y2BaNiO5. The increase in the Ni formal oxidation state associated with the Ca content has been probed. This effect gives rise to a shortening of the Ni-O distances along the main axes of the NiO6 octahedra. The magnetic behaviour has been measured in both pure and Ca-doped samples. The system shows how the one-dimensional antiferromagnetic correlations are lost for Ca-doping values as low as 10%.