Change data array to reduce memory usage

Change from sparse array to only recording valid points. This reduces
memory requirements and produces a human readable XLS output (with
correct column headings).