All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.groovy.scriptom.util.office.ExcelHelper Maven / Gradle / Ivy

The newest version!
//
// Generated stub from file:/C:/work/groovy/modules/scriptom/tags/SCRIPTOM-1.6.0/scriptom-office-2k3/src/main/groovy/office/ExcelHelper.groovy
//

package org.codehaus.groovy.scriptom.util.office;

import java.lang.*;
import java.io.*;
import java.net.*;
import java.util.*;
import groovy.lang.*;
import groovy.util.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.codehaus.groovy.scriptom.Scriptom;
import org.codehaus.groovy.scriptom.ActiveXObject;
import org.codehaus.groovy.scriptom.tlb.office.MsoAutomationSecurity;
import org.codehaus.groovy.scriptom.tlb.office.MsoFeatureInstall;

/**
 * This helper contains all you need to process data out of existing Excel files
 * or create new Excel files based on a template - reliably - at the
 * server.

* * First, Excel is tricky to get working on the server, particularly on startup * and saving results. The .xls or .xlt file that Excel opens must never have * any other locks on it, or Excel throws up a dialog. To prevent this, we always * copy the input file to a temporary file, and then copy the temporary file to * the desired output file (since the output file might already exist, it is * as much a potential problem as the input file).

* * Second, there are a number of flags that must be set just so to suppress * various potential dialogs that can pop up. These include: *

    *
  • Visible - false
  • *
  • DisplayAlerts - false
  • *
  • AutomationSecurity - force disable
  • *
  • AlertBeforeOverwriting - false
  • *
  • AskToUpdateLinks - false
  • *
  • FeatureInstall - none
  • *
* * As a finishing touch, the request to {@code ExcelHelper} is run in a * MTA (Multi-Threaded Apartment model), so it can run from any thread in the * process. * * @author Jason Smith */ public class ExcelHelper extends java.lang.Object implements groovy.lang.GroovyObject { private Boolean debug = null; public Boolean getDebug() { throw new InternalError("Stubbed method"); } public void setDebug(Boolean value) { throw new InternalError("Stubbed method"); } /** * Magic constructor */ private ExcelHelper(java.lang.Void void0, java.lang.Void void1, java.lang.Void void2) { throw new InternalError("Stubbed method"); } public ExcelHelper() { this((java.lang.Void)null, (java.lang.Void)null, (java.lang.Void)null); throw new InternalError("Stubbed method"); } public ExcelHelper(Boolean debug) { this((java.lang.Void)null, (java.lang.Void)null, (java.lang.Void)null); throw new InternalError("Stubbed method"); } /** * Process a .xls file without saving the results. This is intended for * reading Excel files. * * @param inputXL Input .xls file to process. */ public void process(File inputXL, Closure closure) { throw new InternalError("Stubbed method"); } /** * Create a new .xls file based on a template (.xls or .xlt). * * @param templateXL The template .xls or .xlt file. * @param outputXL The file to save changes to. * @return The file created (same as outputXL). */ public File create(File templateXL, File outputXL, Closure closure) { throw new InternalError("Stubbed method"); } private File copy(File source, File dest) { throw new InternalError("Stubbed method"); } public groovy.lang.MetaClass getMetaClass() { throw new InternalError("Stubbed method"); } public void setMetaClass(groovy.lang.MetaClass metaClass) { throw new InternalError("Stubbed method"); } public java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args) { throw new InternalError("Stubbed method"); } public java.lang.Object getProperty(java.lang.String name) { throw new InternalError("Stubbed method"); } public void setProperty(java.lang.String name, java.lang.Object value) { throw new InternalError("Stubbed method"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy