01: /*
02: * PoiHelper.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2007, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.db.exporter;
13:
14: /**
15: * @author Thomas Kellerer
16: */
17: public class PoiHelper {
18: private static boolean tested = false;
19: private static boolean available = false;
20:
21: public static boolean isPoiAvailable() {
22: if (tested)
23: return available;
24:
25: try {
26: tested = true;
27: Class.forName("org.apache.poi.hssf.usermodel.HSSFWorkbook");
28: available = true;
29: } catch (Throwable th) {
30: available = false;
31: }
32: return available;
33: }
34: }
|