Posts

Showing posts from January, 2009

Difference between SET & SELECT in TSQL

The following Two blogs explains difference between SET & SELECT When assigning values to local variables. http://vyaskn.tripod.com/differences_between_set_and_select.htm http://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/05/18/449.aspx

AJAX Client Life-Cycle Events

AJAX Client Life-Cycle Events http://msdn.microsoft.com/hi-in/library/bb386417(en-us).aspx How to call Server Side function from Client Side Code using PageMethods in ASP.NET AJAX (Without Update Panels) http://www.dotnetcurry.com/ShowArticle.aspx?ID=109 Cancelling an Asynchronous PostBack in ASP.NET Ajax http://www.dotnetcurry.com/ShowArticle.aspx?ID=176

Update Excel Sheet using C#, Where Excel not Installed on Server

I am going to show two ways of Excel Sheet Update using C#. Oneway is Where MS Excel got installed on the Server. Steps to Update Excel File: 1) Get the File Name on the Server. 2) Create _Application calss Instance 3) Create _WorkBook calss Instace for _Application 4) Get the available Sheets for _WorkBook Object 5) Update Excel Sheet Columns with Desired Values. 6) Save the Workbook and Quit Application Add the following Referece to the Program: using Microsoft.Office.Interop.Excel; /// /// Takes Newly Generated ECR No and Updated ECR Form with ECR No, Description /// Need Excel Installed On Production Server using UpdateECRForm() method /// /// protected void UpdateECRForm( int _ECRNo) { string xlsFileName = Server.MapPath( ConfigurationManager .AppSettings[ "NewECRFormName" ].ToString() + _ECRNo + ".xlsx" ); _Application xl = new ApplicationClass (); _Workbook wb = xl.Workbooks.Open(xlsFileName, 0, false , 5, Missing .Value, Missing .Value, false , M