public class LoadXlsDataToDynamicTable
extends javax.servlet.http.HttpServlet
| Modifier and Type | Field and Description |
|---|---|
static org.apache.log4j.Logger |
log |
| Constructor and Description |
|---|
LoadXlsDataToDynamicTable() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
List<Map<String,String>> |
getDataFromExcel(org.apache.commons.fileupload.disk.DiskFileItem file,
String[] keys)
Metoda pobierajaca z pliku .xls wszystkie pozycje okreslonych kolumn.
|
List<Map<String,String>> |
getDataFromExcelWithTypeValidation(org.apache.commons.fileupload.disk.DiskFileItem file,
Map<String,String> idTypeMap)
Metoda pobierajaca z pliku .xls wszystkie pozycje okreslonych kolumn, sprawdza czy typy w pliku xls zgadzaja sie
z typami z mapy
|
static String |
getServerPath(javax.servlet.http.HttpServletRequest request) |
void |
init() |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, servicepublic void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletpublic void init()
throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletExceptionpublic void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic static String getServerPath(javax.servlet.http.HttpServletRequest request) throws Exception
Exceptionpublic void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic List<Map<String,String>> getDataFromExcel(org.apache.commons.fileupload.disk.DiskFileItem file, String[] keys) throws jxl.read.biff.BiffException, IOException, CUFException
fileName - - link do pliku xlskeys - - tablice kluczy określajace kolumnyIOExceptionjxl.read.biff.BiffExceptionCUFExceptionpublic List<Map<String,String>> getDataFromExcelWithTypeValidation(org.apache.commons.fileupload.disk.DiskFileItem file, Map<String,String> idTypeMap) throws Exception
fileName - - link do pliku xlsidTypeMap - - mapa ExceptionCopyright © 2015 Suncode. All rights reserved.