Excel File
i am opening an existing excel file in c# when the excel sheet open it shows me existing data in it ,so before opening an existing file i all rows must be empty ,how to do this, but this excel sheet is in compatible mode
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Selva GanapathyRank #560 · 4.3K reputationPosted Nov 28, 2014, 12:45 AM EST
Hi Umer ali,
Can i know Why you try to open existing one instead of creating new (for this case, because you want an empty excel)?
Regards,
Selva Ganapathy K
Joginder BangerRank #360 · 7K reputationPosted Nov 28, 2014, 1:56 AM EST
first of all you need a save in you save on project. like any folder and after then change the security like a editable mode.
run this query
string sqlQ = "Delete [" + sheetname + "$]";
and after then new sheet add with the same name.