LoadHeader

Declaration: TSpecCollection.LoadHeader (FName: string; var NSpectra: integer; var ILabFName: string): integer;
The method LoadHeader reads the header information of the spectral collection specified by FName. The variable parameter NSpectra returns the number of spectra in the collection, the parameter ILabFName returns the name of the datafile the collection is assigned to.

The function returns the following error codes:

 0 ... everything is OK, the header has been read successfully
-1 ... the spectral collection file does not exist

Hint: In order to access the spectral collection currently loaded in the Spectral Collection Editor you can use the pre-declared global variable SCData.