cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
lehaofeng
Level V

JMP17 JSL 读取多张表时值为空怎么解决?

JMP17版本用之前15版正常的读取程序,结果为空值。比如第一个表中一行是1,2,3这种值的,第二张表这一系列,是这列,ML1,R1拼接在一起,L1,R1,M1就自动改变亏值。求问大佬怎么解决?

dir = Pick Directory( "Select a directory" );

//得到所有文件名,注意要确保所有表格字段名一致,且表格样式一样,否则会得到非预期结果。
files = Files In Directory( dir, Recursive );
If( Contains( files, ".DS_Store" ),
 files = Remove( files, Contains( files, ".DS_Store" ) )
);

For( i = 1, i <= N Items( files ), i++,
 fullfile = dir || files[i];
 dt = Open(
  fullfile, 

  Worksheets( "HGS" ),
  Use for all sheets( 1 ),
  Concatenate Worksheets( 0 ),
  Create Concatenation Column( 0 ),
  Worksheet Settings(
   1,
   Has Column Headers( 1 ),
   Number of Rows in Headers( 1 ),
   Headers Start on Row( 1 ),
   Data Starts on Row( 2 ),
   Data Starts on Column( 1 ),
   Data Ends on Row( 0 ),
   Data Ends on Column( 0 ),
   Replicated Spanned Rows( 1 ),
   Replicated Spanned Headers( 0 ),
   Suppress Hidden Rows( 1 ),
   Suppress Hidden Columns( 1 ),
   Suppress Empty Columns( 1 ),
   Treat as Hierarchy( 0 ),
   Multiple Series Stack( 0 ),
   Import Cell Colors( 0 ),
   Limit Column Detect( 0 ),
   Column Separator String( "-" )
  )
    
 );

 dt << New Column( "文件名", character, width( 8 ), <<set each value( files[i] ) );
 If( i == 1,
  (dt1 = dt ; dt1 << Set name( "Tem" ))
 );
 If( i > 1,
  dt1 << Concatenate( dt, "Append to first table" );
  
 );
);
0 REPLIES 0