How I choose cross-country skis

Cross-country skis are not chosen by height alone. The single most important number is how stiff the ski is relative to your weight, and most shops can measure it in a couple of minutes.
The paper test
Stand on both skis on a flat floor with a sheet of paper under your feet. For classic skis, the paper should slide freely when your weight is split evenly and get pinched when you stand on one ski. That middle zone, called the kick zone, is where grip wax goes. If the paper is pinched even on two skis, the ski is too soft and will drag. If it never gets pinched, the ski is too stiff and you will never get grip.
Skate skis are stiffer and the test is different: the gap under the foot should stay open on two skis and close only partly on one.
Length and poles
Manufacturers publish weight tables, and I trust them more than the old height formulas. For poles, classic poles usually reach about the armpit, skate poles about the chin or upper lip. When in doubt, go slightly shorter for classic.
Boots and bindings
Boots matter more than skis for comfort. Try them with the socks you actually ski in, and check the binding system before you buy: most new skis come with NNN-compatible plates, but older gear can use other standards.