Click here to Skip to main content
15,921,250 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my code as follows saving the database records in to excel for that code as follows;

xlWorkBook.SaveAs(@"C:\CourseWiseReport.xls", Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);


when i save the excel,before saving the excel file message shows

A file named 'C:\courseWiseReprot.xls' already exists in this loaction.Do you want to replace it?
Yes No Cancel.

when i save the excel,when i click the button i want to show the message as follows

Excel File Created.

i want to show the above message only.
i do not want
A file named 'C:\courseWiseReprot.xls' already exists in this loaction.Do you want to replace it?
Yes No Cancel.
the previous message.

how can i do?

help me.
Posted
Comments
[no name] 2-Feb-13 1:38am    
WinForm or ASP ???

set the WorkBook.Saved property to true before you perform the SaveAs operation to avoid the prompt dialog box
WorkBoo.Saved[^]
 
Share this answer
 
See this example[^] and Solution #1 is also right for your query...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900