如何导出一个JTable为.csv文件? [英] How to export a JTable to a .csv file?

查看:444
本文介绍了如何导出一个JTable为.csv文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

之类的标题所暗示的,我正在寻找一种方式,以一个JTable的数据导出到 .csv文件后,。我不是在寻找其他的选择,然后 CSV ,因为 CSV 是我的程序的要求。

Like the title implies, i am looking for a way to export a jtable with data to a .csv file. I am not looking for other options then CSV, because CSV is the requirement for my program.

我一直在寻找某些东西,比如 bindy apache.camel 把我找不到足够的信息来了解如何使用它。

I have been looking at certain things, like bindy of apache.camel put I couldn't find enough information to understand how to use it.

什么建议?如果有人有 bindy 的使用的一个体面的例子,我不会介意无论是。

What is recommended? If someone has a decent example of the usage of bindy I wouldn't mind either.

友好的问候,

Skillcoil

Skillcoil

推荐答案

您可以使用的Apache POI 产生从JTable的Excel文件,然后使用这个code
从这里 XLS转换到CSV文件使用Java 为XLS文件导出为CSV文件。

You can use apache poi to generate an Excel file from the JTable then use this code from here Converting XLS to CSV files Using Java to export XLS file to CSV file.

我居然用这种方式来生成CSV文件

I actually use this way to generate CSV files

这篇关于如何导出一个JTable为.csv文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆