How to control MCP3008 sampling rate by Arduino & How to write excel file

My problem is how to control sampling rate

The same way you control any other sampling rate. Call the read_adc() function at specific intervals - using millis(), micros() or a timer interrupt, to determine if it is time to sample again.

Besides, how to write these data (ADC value) with timestamp and elapsed time into a excel file

First, you go to Microsoft's web site and download the Excel for Arduino application. Good luck with that. While you're there, you might want to see if you can find Win7 for the Arduino, so it has an operating system.