如何将输出写入到robotium的Excel中?

我已经使用POI将输出写入Excel。 我的代码在一个正常的Android应用程序中完美工作。 但是当我运行应用程序作为Android J单位写入Excelfunction不起作用。这里是我在robotiumtesting项目中使用的条件

if (solo.getButton("Submit").isShown()){ new TestResult().resultToExcel("/mnt/sdcard/Test_output.xls",0, "TC_memory1", "passed","testcase passed",6); } else { new TestResult().resultToExcel("/mnt/sdcard/Test_output.xls",0, "TC_memory1", "failed","testcase failed",6); } 

任何人都可以提出一个方法来使用robotium将输出写入excel文件。