I want to write the data to excel but the formatting of the excel sheet should not change , like the color of the cell or font styles or formulas anything
You define one Excel file with all predefined styles and formats and use this file template. Whenever you want to write data then use copy this template file into other folder and then write data into it.
Any other way using vb code
Once check it BalaReva.Excel.Activities
Checked it earlier didn’t help me
Then once give it at a try with above mentioned way like creating template file.