こんにちは、私はforループでファイルを保存しようとしています。問題は、ファイル保存手順に変数をどのように配置するかです。
ただし、ファイル保存部分が機能していないようです。
ファイル名が元の値で割り当てられていることを確認するために、明確なグローバルを使用しませんでした。
保存部分に問題はありますか?
ありがとう
// filename is a variable assigned below,
For( j = 1, j <= N Row( sdt ), j++,
filename = Column( sdt, "file" )[j];
Close( Data Table( sdt ), No Save );
// During saving the file, the directory is fixed, however the filename is an variable, <BR />// the goal is to use the left(filename,18) and concatenate with "_Type1" in the file name.
dt1 = Current Data Table();
dt1 << save( "C:\Users\file\JSL\"||Right( filename,18)||"_Type1.csv" );
やあ
これが役立つかもしれないので、私はコードを少し変更しました:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
path = "C:\Users\file\JSL\"
For( j = 1, j <= N Row( dt ), j++,
dt << save as (path || dt:name[j] || "_Type1.csv" );
);
それを機能させるには、「名前を付けて保存」を行う必要がある可能性があります。