hi all
i hope i am posting this at the right place; i have a small prototype that opens an existing xla file and then checks to see if it is protected with rights. The code is written in c# :
Console.WriteLine("Hello Excel");
Microsoft.Office.Interop.Excel.ApplicationClass excelApp = new Microsoft.Office.Interop.Excel.ApplicationClass();
excelApp.Visible = false;
Microsoft.Office.Interop.Excel.Workbook wb = null;
try
{
wb = excelApp.Workbooks.Open(eFileName, 0, false, 5, "", "", false, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows,"",false, false, 0, true, false, false);
}
catch (Exception comException)
{
Console.WriteLine("exception while opening file : " + comException.Message);
wb.Application.Quit();
}
wb.Activate();
try
{
if (!wb.Permission.Enabled)//this is causing problem)
at this point an exception is thrown which is:
Server threw an Exception HRESULT: 0x80010105
I have tried searching and found lots of entries but none of them worked out for me, if anyone has any idea how to go about it please do reply.
thanks in advance.
i hope i am posting this at the right place; i have a small prototype that opens an existing xla file and then checks to see if it is protected with rights. The code is written in c# :
Console.WriteLine("Hello Excel");
Microsoft.Office.Interop.Excel.ApplicationClass excelApp = new Microsoft.Office.Interop.Excel.ApplicationClass();
excelApp.Visible = false;
Microsoft.Office.Interop.Excel.Workbook wb = null;
try
{
wb = excelApp.Workbooks.Open(eFileName, 0, false, 5, "", "", false, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows,"",false, false, 0, true, false, false);
}
catch (Exception comException)
{
Console.WriteLine("exception while opening file : " + comException.Message);
wb.Application.Quit();
}
wb.Activate();
try
{
if (!wb.Permission.Enabled)//this is causing problem)
at this point an exception is thrown which is:
Server threw an Exception HRESULT: 0x80010105
I have tried searching and found lots of entries but none of them worked out for me, if anyone has any idea how to go about it please do reply.
thanks in advance.