Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
xlWorkBook.SaveAs("c:\\excelfilename.xls", MyExcel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, MyExcel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);


i want use date\time for replacement of excelfilename like log format.
Posted

Change "c:\\excelfilename.xls" with
C#
"C:\\" + Now.ToString("yyyyMMddHHmmss") + ".xls"
 
Share this answer
 
Comments
harishtaware 16-Aug-11 1:23am    
hey friend Now word showing error:Error 35 the name 'Now' does not exist in the current context
Prerak Patel 16-Aug-11 1:58am    
Try System.DateTime.Now.ToString then...
"C:\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls"
 
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