I have created an Excel Add-in using VSTO in C#. I want to create a new Excel file from a template located on a SharePoint site. A file picker dialog box is used so the user can chose which file to use as a template. Everything works fine exept the new workbook is created as read only. If I copy the template file on my computer, and use the same program to pick that file as a template, the new workbook is not created as read only. 

The file on the sharePoint is not being open elseware when creathing the new file. Is there a way to specify the sharePoint library is a safe source? Or to set the newly created workbook readonly property to false?

{

```
string pathSP= @”\\Business.sharepoint.com@SSL\teams\group\NDC\”;

if (System.IO.Directory.Exists(pathSP))
{
    Excel.Application excelObj = Globals.ThisAddIn.Application;
    Office.FileDialog fileDialog = excelObj.FileDialog[Office.MsoFileDialogType.msoFileDialogFilePicker];
    fileDialog.InitialFileName = initialPath;
    fileDialog.AllowMultiSelect = false;
    fileDialog.InitialView = Office.MsoFileDialogView.msoFileDialogViewDetails;
    fileDialog.Title = "Create Excel file from template";
    fileDialog.Filters.Clear();
    fileDialog.Filters.Add("Excel template", "*.xls; *.xlsx; *.xlsm; *.xltx; *.xltm; *.xlt", 1);
    string TemplatePath;

    if (fileDialog.Show() == -1)
    {
        templatePath = fileDialog.SelectedItems.Item(1);
        fileDialog = null; 
    }
    else
    {
        templatePath=""
        fileDialog = null;
    }

    if (templatePath != "")
    {
        Excel.Workbook ws= excelObj.Workbooks.Add(templatePath);
    }

}     
else
{
    MessageBox.Show("SharePoint site is not available", "Create Excel file from template", MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}

```

}