Several practical issues related to the need for sample preparation of solid dosage forms for their identification by near-infrared (NIR) spectroscopy are discussed. It is shown using a classification method, i.e., discriminant analysis, that the tablet coating regardless of its thickness did not affect the accuracy of the analytical results. However, calibration error due to the influence of opaque hard gelatin shells is possible during identification using diffuse reflectance spectra. It is proven that errors in assigning a sample to one group or another are avoided and; therefore, it is rapidly identified if the hard gelatin shell is removed and NIR spectra are recorded directly from the capsule contents. © 2016, Springer Science+Business Media New York.