locked
Open excel in client side without saving RRS feed

  • Question

  • User-706883594 posted

     public Excel.Application ObjXls;
        public Excel.Workbook ObjWb;
        public Excel.Worksheet ObjWs;
            Excel.Range range;
            object oMissing = Missing.Value;


            try
            {

                ObjXls = new Excel.Application();
                ObjWb = (Excel.Workbook)(ObjXls.Workbooks.Add(1));
                ObjWs = (Excel.Worksheet)ObjWb.Sheets[1];
                ObjWs.Name = "PNL";

    //     data added in excel .............

     Excel.AllowEditRanges allowEdits = ObjWs.Protection.AllowEditRanges;                //
                allowEdits.Add("Editable Cell", ObjWs.get_Range(EditIndexStart, EditIndexEnd), Type.Missing);

         
                object getPasswordFromUser = "password";

             

                ObjWs.Protect(getPasswordFromUser, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, true, oMissing, oMissing);
                ObjXls.Visible = true;
                ObjWb.Protect("", true, false);

    }

    // how open the above excel on client side  without saving

    Monday, April 4, 2011 4:26 AM

Answers

  • User-417784260 posted

    It is not possible to open excel on the client side of website with c# code.  All c# code runs on the server.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 4, 2011 6:12 AM

All replies

  • User-417784260 posted

    It is not possible to open excel on the client side of website with c# code.  All c# code runs on the server.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 4, 2011 6:12 AM
  • User-706883594 posted

    thanks,

    Ashish

    Monday, April 4, 2011 6:35 AM