935090232@qq.com
2021-03-18 5d43370b99a03391c9271d04d3f351f0fd734dae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.matrix;
 
 
import java.io.IOException;
 
public class TestClass {
    public static void main(String[] args) throws IOException {
 
        int times = 10000 * 10;
        Object[] cells = {"满100减15元", "100011", 15};
 
        //  导出为CSV文件
        long t1 = System.currentTimeMillis();
//        FileWriter writer = new FileWriter("E:/test1.csv");
//        CSVPrinter printer = CSVFormat.EXCEL.print(writer);
//        for (int i = 0; i < times; i++) {
//            printer.printRecord(cells);
//        }
//        printer.flush();
//        printer.close(); 
        long t2 = System.currentTimeMillis();
        System.out.println("CSV: " + (t2 - t1));
    }
}