how to open Excel sheet with full access in c#
Posted
by Lalit
on Stack Overflow
See other posts from Stack Overflow
or by Lalit
Published on 2010-05-07T12:10:30Z
Indexed on
2010/05/08
5:38 UTC
Read the original article
Hit count: 487
open Excel sheet with full privileged in c#. it is not allowing me to read. asking for uname and pwd when i deploye my c# application in iis.
i have write this code for open Excel : please review
Excel.ApplicationClass app = new Excel.ApplicationClass(); Excel.Workbook workbook = app.Workbooks.Open( strSheetPath, 0, true, 5, "", "", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0 );
Excel.Worksheet worksheet = (Excel.Worksheet)workbook.ActiveSheet;
Excel.Range rng = null;
Excel.CellFormat format;
rng = worksheet.get_Range("A2", Missing.Value);
rng = rng.get_End(Excel.XlDirection.xlToRight);
rng = rng.get_End(Excel.XlDirection.xlDown);
© Stack Overflow or respective owner