Re: How we will store the value in to Excel sheet ?
This is a two step process:
First, you need to retrieve the variable data. To do this, you need to use a function like Extract String or something similar, depending on the middleware you are using.
Second, inside the test script, you need to use a command called SCRIPT_MESSAGE - this allows you to output any text data you want - including variables - to the Analyze timing file.
Once this data is in Analyze, you can either create the pivot tables in EXCEL directly and import the XML file that contains all this, or you can export the data from Analyze into a CSV file and then read that into EXCEL.
The one option that you might think of is having the individual virtual user write out to a file - this is a really bad idea, as that kind of local disk activity will quickly create artificial delays, as each VU on the machine waits for a read-write hard drive head to become available to complete their operation. Best case you end up with one file per VU that then needs to be consolidated - worst case is the file I/O fails due to file contention problems (with multiple VUs trying to access the same file all at once).