1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod Import ( 
 |    MacroPlan macroPlan, 
 |    GeneralExcelImportAndExportDataTable table 
 |  ) 
 |  { 
 |    TextBody: 
 |    [* 
 |      generation := ""; 
 |      mqb_mlb    := ""; 
 |       
 |      traverse ( table, GeneralExcelImportAndExportDataRow, row ) { 
 |        traverse ( table, GeneralExcelImportAndExportDataColumn, column ) { 
 |          // 单元格值 
 |          cellValue := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDCell, tempGEIAEDCell.GeneralExcelImportAndExportDataColumn() = column ).Value(); 
 |           
 |          if ( column.ColumnIndex() = 0 and cellValue <> "" ) { 
 |            generation := guard( cellValue.Tokenize( " " ).Element( 0 ), "" ); 
 |            mqb_mlb    := guard( cellValue.Tokenize( " " ).Element( 1 ), "" ); 
 |          } 
 |           
 |           
 |          // 料架总数设置列 
 |          mrc  := select( macroPlan, MaterialRackColumn, tempMRC, tempMRC.Month() = guard( [Number]column.Name(), 0 ) ); 
 |          // 料架总数设置行 
 |          mrtr := select( macroPlan, MaterialRackTotalRow, tempMRTR, tempMRTR.Generation() = generation and tempMRTR.MLB_MQB() = mqb_mlb ); 
 |           
 |          if ( column.ColumnIndex() > 0 and not isnull( mrc ) and not isnull( mrtr ) ) { 
 |            cell := select( mrtr, MaterialRackTotalCell, tempMRTCell, tempMRTCell.MaterialRackColumn() = mrc ); 
 |             
 |            cell.Quantity( [Real]cellValue ); 
 |          } 
 |        } 
 |      } 
 |    *] 
 |  } 
 |  
  |