Force vs Displacement Measurement

Looking for guidance on a build I am doing. I have a machine that compresses springs by a hydraulic cylinder. I currently have a LC8300 load cell, but nothing for measurement. I'm wanting to capture the data and view on the computer in either a software or possibly Excel. The cylinder has a 15" stroke if that helps.

HRobbins: but nothing for measurement.

Did you mean to say "nothing for distance measurement".

How accurately do you need to measure the displacement?

What about using one the gauges that are used on machine tools