如何正确导出包含新行字符的单元格?

时间:2016-09-06 03:50:14

标签: openrefine

我有一行数据如下。问题是它将在csv文件中导出为三行;如何将其导出为一行?

    ________________________________________________________________________________________
    |id              |exception
    --------------------------------------------------------------------------------------
    |cell_1_content  |hash*app_version*..is not enabled.
    |                |   at android.app.ActivityThread.deliverResults(ActivityThread.java:2982)
    |                |   at android.app.ActivityThread.handleSendResult(ActivityThread.java:3025)
    |                |   at android.app.ActivityThread.access$1100(ActivityThread.java:123)
     _______________________________________________________________________________________

1 个答案:

答案 0 :(得分:0)

您能发送一份真实工作表的简短样本吗?

但是如果你的Open精炼项目看起来像这样(截图),你可以收集单元格" exception"使用此Grel公式(列"例外",根据此列添加列):

public class MainActivity extends AppCompatActivity {

private static final String TAG = "MainActivity";
private Subscription sub1;
private OnSubscribeRefreshingCache<List<Post>> postCache;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        postCache = new OnSubscribeRefreshingCache(Repository.instance().getAll());
        sub1 = subscribe(Observable.create(postCache));
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (sub1 != null && !sub1.isUnsubscribed()) {
            sub1.unsubscribe();
        }
    }

    private Subscription subscribe(Observable<List<Post> postObservable){
        return postObservable.subscribe(/* handle posts list */);
    }

    private void invalidateCache(){
        postCache.reset();
        sub1 = subscribe(Observable.create(postCache));
    }
}

然后,分面栏&#34; ID&#34;通过_blank,点击&#34; true&#34;和&#34;删除所有匹配的行&#34;。

screenshot