我创建了一个 csv 文件,
并将数据库中的数据显示到该文件中,
如何将饼图添加到该文件,
这是我制作的代码:
File file = new File("C:/Users/MY TOSHIBA/Desktop/chart.CSV");
Writer output =null;
output = new BufferedWriter(new FileWriter(file));
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@ 127.0.0.1:1521:XE","username","password");
String sql="select * from table";
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(sql);
while(rs.next())
{
String teller =rs.getString("name");
String flag=rs.getString("flag");
output.write(teller+flag+"\n");
}
output.close();