com.acesoft.aceoffix
Class ExcelRequest

java.lang.Object
  extended by com.acesoft.aceoffix.ExcelRequest

public class ExcelRequest
extends java.lang.Object

Extracts data from the Excel spreadsheet submitted by AceoffixCtrl. ExcelRequest is a important class. ExcelRequest object contains the data submitted by AceoffixCtrl. If you need to extract data from Excel spreadsheet you have to create ExcelRequest object.

Make sure that ExcelResponse object is created and some Cells, TableRanges are specified to be submitted before you call AceoffixCtrl.openDocument method. Only the submitted Cells, TableRanges can be extracted from ExcelRequest object. ExcelRequest object only can be created in the server page specified by AceoffixCtrl.setSaveDataPage.

Version:
3.0
Author:
Acesoft Corporation

Constructor Summary
ExcelRequest(HttpServletRequest request, HttpServletResponse response)
          Initializes a new instance of the ExcelRequest class.
 
Method Summary
 void close()
          Returns a success message to AceoffixCtrl.
 java.lang.String getFormField(java.lang.String name)
          Gets the value with the specified name in the form fields of the page with AceoffixCtrl.
 ExcelReqSheet openSheet(java.lang.String sheetName)
          Opens the specified worksheet and returns a ExcelReqSheet object.
 void showPage(int width, int height)
          Prompt a custom dialog box to show the saving result.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelRequest

public ExcelRequest(HttpServletRequest request,
                    HttpServletResponse response)
             throws java.lang.Exception,
                    java.io.IOException
Initializes a new instance of the ExcelRequest class. ExcelRequest object only can be created in the server page specified by AceoffixCtrl.setSaveDataPage.

Throws:
java.lang.Exception
java.io.IOException
Method Detail

openSheet

public ExcelReqSheet openSheet(java.lang.String sheetName)
                        throws java.io.IOException,
                               java.lang.Exception
Opens the specified worksheet and returns a ExcelReqSheet object. If the specified worksheet exists, this method will return a ExcelReqSheet object.

Parameters:
sheetName - The name of worksheet. The worksheet name is shown on the tab for the worksheet.
Throws:
java.io.IOException
java.lang.Exception

close

public void close()
           throws java.io.IOException
Returns a success message to AceoffixCtrl.

If the code for saving document executes successfully, you should call this method to return a success message to AceoffixCtrl. Typically, the close method should be called at the end of code in SaveDataPage.

Throws:
java.io.IOException

showPage

public void showPage(int width,
                     int height)
              throws java.io.IOException
Prompt a custom dialog box to show the saving result.

After save document, if you want to prompt a custom dialog box to show the saving result, you can call this method. The message page shown in the dialog box is the current SaveDataPage. By default, the SaveDataPage will display nothing. You can add friendly messages in the SaveDataPage.

Parameters:
width - The width of custom dialog, in pixels.
height - The height of custom dialog, in pixels.
Throws:
java.io.IOException

getFormField

public java.lang.String getFormField(java.lang.String name)
                              throws java.io.IOException,
                                     java.lang.Exception
Gets the value with the specified name in the form fields of the page with AceoffixCtrl.

When AceoffixCtrl is saving document, you can call this method to get the values of form fields posted from the page with AceoffixCtrl. To be able to capture the value, the form field must have a name attribute.

This form field does not support the form collection with the same name. This form field only supports the HTML INPUT tags currently.

Parameters:
name - The name of form field in the page.
Throws:
java.io.IOException
java.lang.Exception