We study the spectrality of a class of self-affine measures \(\mu_{M,D}\) generated by an expanding matrix \(M\in M_{n}(\mathbb{Z})\) and a finite collinear digit set \({D\subset \mathbb{R}^{n}}\) . For the general form of the characteristic polynomial of \(M\) , we analyze the relation between its roots and coefficients, and then give a method to find out a spectrum for \(\mu_{M,D}\) by constructing a similarity transformation. This offers a fresh perspective on constructing a spectrum for \(\mu_{M,D}\) on \(\mathbb{R}^{n}\) . Under a suitable condition, we also obtain a necessary and sufficient condition for self-affine measures with three-element collinear digit set on \(\mathbb{R}^{n}\) to be spectral measures, and then construct a counterexample to a conjecture of Liu et al.