using (var fs = new FileStream("example.xlsx", FileMode.Open, FileAccess.ReadWrite)) { var workbook = new XSSFWorkbook(fs); // do some modifications to the workbook workbook.Close(); }In this example, we create a new XSSFWorkbook object from an existing XLSX file. We then perform some modifications to the workbook, and finally, we call the Close method to close the workbook and free up any resources it might be using. The NPOI.XSSF.UserModel namespace is part of the NPOI library package.