tableLength function

Convert data to formatted data for table