I am saving as any file to .xlsx format. If the original file is not with .xlsx extension, it is throwing exception while trying to open it. The exception message is :-

> 
> Excel cannot open the file 'abc.xlsx because the file format or file
>  extension is not valid. Verify that the file has not been corrupted
>  and that the file extenstion matches the format of the file.
> 
> 
> 

Whereas if conversion is in .xls format, I can open the converted file with warning message.

> 
> The file you are trying to open, abc.xls, is in a different format
>  than specified by the file extension. Verify that the file is not
>  corrupted and is from a trusted source before opening the file. Do you
>  want to open the file now?
> 
> 
> 

I need to convert file to .xlsx format by C# code regardless its extenstion and open it by Excel 2010.