C#向excel中写入后excel打开不了了?

我想在excel中写入一个值,为什么加了倒数第六-倒数第三行的代码,excel就打不开了
图片说明
图片说明

 class Program
{
    static void Main(string[] args)
    {


        string name = "xxx";
        string TempletFileName = System.AppDomain.CurrentDomain.BaseDirectory + "Data\\excel3.xlsx";
        FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
        IWorkbook hssfworkbook = new XSSFWorkbook(file);
        ISheet ws = hssfworkbook.GetSheet("Sheet1");
        IRow row = ws.GetRow(1);
        ICell cell = row.GetCell(19);
        cell.SetCellValue(name);
        Console.WriteLine(cell);

        ws.ForceFormulaRecalculation = true;

        using (FileStream filess = File.OpenWrite(TempletFileName))
        {
            hssfworkbook.Write(filess);
        }


        Process.Start(TempletFileName);
    }

你先试试看,将它写入一个新的文件名(而不是原来读取得这个),行不行