Helius
2020-12-23 4c846cd7210dd0d0255a3088055315275b6e6a68
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.matrix;
 
 
import java.io.FileWriter;
import java.io.IOException;
import java.math.BigDecimal;
 
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));
    }
}