a
This commit is contained in:
1 parent
f2643a86ac
commit
911b897d5b
2 files changed
+2
-2
No files matched your search
@@ -9,7 +9,7 @@ import java.sql.Statement;
|
||||
|
||||
public class ExportToCSV {
|
||||
public static void to() {
|
||||
String outputFile = "图书信息.csv";
|
||||
String outputFile = "Library Data.csv";
|
||||
try (Connection connection = DBConnection.getConnection();
|
||||
Statement statement = connection.createStatement();
|
||||
ResultSet resultSet = statement.executeQuery("SELECT * FROM book");
|
||||
|
||||
@@ -15,7 +15,7 @@ public class ExportToXLS {
|
||||
try (Connection connection = DBConnection.getConnection();
|
||||
Statement statement = connection.createStatement();
|
||||
ResultSet rs = statement.executeQuery("SELECT * FROM book");) {
|
||||
WritableWorkbook book = Workbook.createWorkbook(new File("图书信息.xls"));
|
||||
WritableWorkbook book = Workbook.createWorkbook(new File("Library Data.xls"));
|
||||
WritableSheet sheet = book.createSheet("sheet1", 0);
|
||||
Label label = new Label(0, 0, "title");
|
||||
sheet.addCell(label);
|
||||
|
||||
Reference in new issue
Block a user