Fix excel data saving bug, refatoring testings