JPrakash,
One way you can do this is read the serial number of the DAQmx device (or some other device specific property), compare it to the device that the program is licensed to, then either allow the program to run or return an error if there is not a match. To find the serial number of the device, you can use the DAQmx Device Property Node, which can be found on the block diagram at
Measurement I/O->NI-DAQmx->Advanced->System Setup->DAQmx Device Property Node. To use this property node you will need to wire the active device in (Dev1, Dev2, etc) then read out the serial number.
To record the readings in an Excel worksheet, you can use the Excel toolkit, which you can download
here. You can install this library into the user.lib folder inside the LabVIEW folder, and when you restart LabVIEW, the VI's will be available under the User Libraries palette on the block diagram. You could also look in the LabVIEW Example Finder (Help->Find Examples) and look specifically at the Write Table to XL.vi. This will be a good example of how you can write your tabular data to an Excel worksheet. Hope this helps!
Brian T
Applications Engineer