WebSheetUpload

Upload your excel files and see the results...

Only support xlsx format.

Demo

Try upload your excel file to see the result as below:

Load Excel File
Choose
LOADING
Source code
<h3>Try upload your excel file to see the result as below:</h3>

<h:form id="form1">
    <p:commandButton partialSubmit="true" immediate="true"
        onclick="PF('dlgAdd').show();"
        value="Upload Your Excel File" id="cmdLoad"
        styleClass="commandExButton" update="@this" />
        
    <tie:websheet id="sheet1" webSheetBean="#{webSheetUpload}"
        maxRowsPerPage="100" >
    </tie:websheet>
    <p:remoteCommand name="refreshafter"
        actionListener="#{webSheetUpload.refreshAfter}"
        update="@form"
        oncomplete="PF('bui').hide()"
         />            
    <p:dialog modal="true" appendTo="@(body)" widgetVar="dlgAdd"
        header="Load Excel File" width="480" height="160">
        <p:fileUpload
            fileUploadListener="#{webSheetUpload.doLoadFileAction}"
            multiple="false" mode="advanced" auto="true" uploadLabel="Load"
            process="@this" allowTypes="/(\.|\/)(xls|xlsx|xlsm)$/"
            oncomplete="PF('bui').show();PF('dlgAdd').hide();refreshafter();">
        </p:fileUpload>
    </p:dialog>        
    <p:blockUI block="form1" widgetVar="bui">
    LOADING<br />
    <p:graphicImage library="showcase" name="img/ajaxloadingbar.gif" />
    </p:blockUI>    
    
</h:form>