package art.servers.rtzserver.reports; import art.library.model.devices.colors.controller.RTZ32.configuration.RTZ32_Configuration_Group; import art.library.model.devices.colors.controller.RTZ32.configuration.RTZ32_Configuration_Program; import art.library.model.devices.colors.controller.RTZ32.configuration.constants.RTZ32_Constants; import art.library.model.devices.colors.controller.RTZ32.types.RTZ32_Report_Information; import art.library.utils.resources.Resources; import art.servers.ServerException; import art.servers.rtzserver.Shared; import java.io.File; import java.io.FileInputStream; import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; public class Report_Configuration extends XLS { public Report_Configuration(String language) throws Exception { this.language = language; String filename = "data/" + Shared.getApplicationName() + "/templates/template_configuration." + language + ".xls"; File file = new File(filename); if (file.exists() == false) file = Resources.getResourceFile(filename); if (file.exists() == false) throw new ServerException("Template not found"); workbook = new HSSFWorkbook(new FileInputStream(new File(filename))); } public byte[] generate(String format, RTZ32_Report_Information reportInformation) throws ServerException { byte[] data = null; try { // Table 1 int sheetNumber = 0; try { HSSFSheet sheet = workbook.getSheetAt(sheetNumber++); for (int i=0; i