Cannot access read-only document 'excel_filename.xls'
Iam working on c# console. what iam trying to do is to get excel template and insert all records in in excell and create a copy to save the excel to network shared folder using a impersonated specific user..but the error was "Cannot access read-only document 'excel_filename.xls'."" please see my code snippet see error SaveAsCopy

mary jean ligasPosted Mar 9, 2016, 1:20 AM
Rajeev PunhaniPosted Mar 9, 2016, 1:15 AM
Hi Mary,
Please try
oMissing, oMissing, oMissing, oMissing, oMissing, oMissing,
oMissing, oMissing, oMissing, oMissing, oMissing, oMissing);
mary jean ligasPosted Mar 9, 2016, 12:45 AM
Amatya AgyeyPosted Mar 9, 2016, 12:44 AM
mary jean ligasPosted Mar 9, 2016, 12:41 AM
Amatya AgyeyPosted Mar 9, 2016, 12:36 AM
mary jean ligasPosted Mar 9, 2016, 12:29 AM
Amatya AgyeyPosted Mar 9, 2016, 12:24 AM
mary jean ligasPosted Mar 9, 2016, 12:15 AM
Amatya AgyeyPosted Mar 8, 2016, 11:52 PM
mary jean ligasPosted Mar 8, 2016, 10:31 PM
mary jean ligasPosted Mar 8, 2016, 12:19 AM
Rajeev PunhaniPosted Mar 8, 2016, 12:15 AM
Hi Mary,
This issue can occur if you are saving to a network drive and you do not have sufficient privileges to save to that drive. Thus, you might not be able to access the file. File might be read-only and user is not allowed to access it. Read-only nature of a file implies that it is not allowed to access or modify a file. Please check folder permission.
mary jean ligasPosted Mar 8, 2016, 12:11 AM
Rajeev PunhaniPosted Mar 7, 2016, 11:50 PM
Hi Mary,
Try to save the Excel file locally and then check if you are able to access it.