This commit is contained in:
xixu-me committed 2024-07-02 11:36:08 +08:00
1 parent f2643a86ac
commit 911b897d5b
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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");
+1 -1
View File
@@ -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);