validate and prepare data for phpexcel