/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package mytime.dal.dao; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import org.apache.poi.hssf.usermodel.HSSFWorkbook; /** * * @author Stefan-VpcEB3J1E */ public class XlsDAO { /** * Saves the spreadsheet * @param workbook * @param fileToSaveTo */ public void saveSheetAsXls(HSSFWorkbook workbook, File fileToSaveTo) { try (FileOutputStream fos = new FileOutputStream(fileToSaveTo)) { workbook.write(fos); } catch (IOException e) { e.printStackTrace(); } } }