Ignore:
Timestamp:
Jul 27, 2010, 3:18:15 PM (11 years ago)
Author:
tabma
Message:
  • added ability to choose sheet, header index and datamatrix index
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/dbnp/importer/ImporterService.groovy

    r729 r732  
    4949     * @return header representation as a MappingColumn hashmap
    5050     */
    51     def getHeader(HSSFWorkbook wb, int sheetindex, theEntity=null){
    52 
    53         def sheet = wb.getSheetAt(sheetindex)
    54         def datamatrix_start = sheet.getFirstRowNum() + 2
     51    def getHeader(HSSFWorkbook wb, int sheetindex, int headerrow, int datamatrix_start, theEntity=null){
     52
     53        def sheet = wb.getSheetAt(sheetindex)   
    5554        def sheetrow = sheet.getRow(datamatrix_start)
    5655        //def header = []
     
    153152     */
    154153
    155     HSSFCell[][] getDatamatrix(HSSFWorkbook wb, header, int sheetindex, int count) {
     154    HSSFCell[][] getDatamatrix(HSSFWorkbook wb, header, int sheetindex, int datamatrix_start, int count) {
    156155        def sheet = wb.getSheetAt(sheetindex)
    157156        def rows  = []
    158         def df = new DataFormatter()
    159         def datamatrix_start = 1
     157        def df = new DataFormatter()   
    160158
    161159        // walk through all rows
Note: See TracChangeset for help on using the changeset viewer.