Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method IdentifyNullValues 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // 删除空行数据 
 | 
    productcolumn := selectobject( this, FinancialSalesColumn, column, column.Index() = 0 ); 
 | 
    unitcolumn    := selectobject( this, FinancialSalesColumn, column, column.Index() = 1 ); 
 | 
    //删除没有对应日期数据的行 
 | 
    traverse ( this, FinancialSalesRow, row ) { 
 | 
      if ( forall( row, FinancialSalesCell, cell, true, ( cell.FinancialSalesColumn() <> productcolumn or cell.FinancialSalesColumn() <> unitcolumn ) and cell.Value().TrimBoth() = "" ) ) { 
 | 
        row.Delete(); 
 | 
      } 
 | 
    } 
 | 
     
 | 
    // 判断是否存在负数 
 | 
    traverse ( this, FinancialSalesRow.FinancialSalesCell, cell ) {  
 | 
      if ( cell.FinancialSalesColumn().Index() <= 1 ) { 
 | 
        if ( cell.Value().TrimBoth() = "" ) { 
 | 
          error( Translations::MP_FinancialProductionReport_ImportIndetifyNullStrings() ); 
 | 
        } 
 | 
      } else { 
 | 
        if ( cell.Value().TrimBoth() = "" ) { 
 | 
          cell.Value( '0' ); 
 | 
    //      error( Translations::AC_SalesForecastInputSource_Error6() ); 
 | 
        } else { 
 | 
          stn := StringToReal::StandardConverter(); 
 | 
          if ( not stn.CanConvert( cell.Value().TrimBoth() ) ) { 
 | 
            error( Translations::MP_FinancialProductionReport_ImportIndetifyIllegalCharacter() ); 
 | 
          } else { 
 | 
            if ( stn.Convert( cell.Value().TrimBoth() ) >= 0 ) { 
 | 
              cell.Value( [String]ceil( stn.Convert( cell.Value().TrimBoth() ) ) ); 
 | 
            } else { 
 | 
              error( Translations::MP_FinancialProductionReport_ImportIndetifyNegativeNumber() ); 
 | 
            } 
 | 
          } 
 | 
        } 
 | 
      } 
 | 
       
 | 
      cell.FinancialSalesRow().DuplicateValueMarker( cell.FinancialSalesRow().DuplicateValueMarker()                  +  
 | 
                                                        ifexpr( cell.FinancialSalesColumn().Index() = 0, "", "-" ) + 
 | 
                                                        cell.Value() 
 | 
                                                       ); 
 | 
    } 
 | 
     
 | 
    // 判断是否存在重复数据 
 | 
    row := selectduplicates( this, FinancialSalesRow, row, true, row.DuplicateValueMarker() ); 
 | 
    if ( row.Size() > 1 ) { 
 | 
      error( Translations::MP_FinancialProductionReport_ImportIndetifyDuplicateData() ); 
 | 
    } 
 | 
  *] 
 | 
} 
 |