Want to implement automated trading through excel for spread trading. Please guide me (provide code for link) how to integrate with zerodha pi or kite

You can use PiBridge to integrate with Pi.
Refer this link PiBridge For Excel