When very high-energy photons (VHE, E>100 GeV) propagate over cosmological distances, they interact with background light by pair production. Observations of spectral features in the VHE band of extragalactic sources related to this energy-dependent absorption process with the H.E.S.S. array of Cherenkov telescopes allow measuring the spectral energy distribution (SED) of the extragalactic background light (EBL), otherwise very difficult to determine. Preliminary results on the determination of the SED of the EBL will be presented, based on the measurements of the energy spectra of blazars with H.E.S.S. at redshifts up to z = 0.2. This model independent approach shows that the shape and overall normalization of the EBL SED is accessible.