|
@@ -7,8 +7,14 @@
|
|
|
|
|
|
package cn.com.qmth.examcloud.core.print.test;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.core.print.common.utils.ExcelUtils;
|
|
|
+import cn.com.qmth.examcloud.core.print.entity.ObjectiveQuestionStructure;
|
|
|
import org.junit.Test;
|
|
|
|
|
|
+import java.io.File;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @author: fengdesheng
|
|
|
* @since: 2018/10/17
|
|
@@ -17,7 +23,13 @@ public class ApplicationTest {
|
|
|
|
|
|
@Test
|
|
|
public void demoTest() throws Exception {
|
|
|
+ List<ObjectiveQuestionStructure> objectives = new ArrayList<>();
|
|
|
+ for (int i = 0; i < 10; i++) {
|
|
|
+ objectives.add(new ObjectiveQuestionStructure());
|
|
|
+ }
|
|
|
|
|
|
+ String objectiveFile = "C:/Users/deason/Desktop/objectives.xlsx";
|
|
|
+ ExcelUtils.exportExcel(ObjectiveQuestionStructure.class, objectives, new File(objectiveFile), "客观题");
|
|
|
}
|
|
|
|
|
|
}
|