- public class ExcelConcat {
- private static final String quote = "\"'\"";
- private static final String dquote = "\"";
- private static final String and = "&";
- private static final String coma = "\",\"";
- private static final char col_start= 'a';
- private static final char col_end = 'g';
- private static final int row = 2;
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- StringBuilder buff = new StringBuilder();
- buff.append("="+dquote+"insert into Table values("+dquote);
- for( char i=col_start;i<=col_end;i++){
- buff.append(and+quote+and+i+row+and+quote);
- if(i<col_end){
- buff.append(and+coma);
- }
- }
- buff.append(and+"\"); commmit;\"");
- System.out.println(buff.toString());
- }
- }
excel java concat
转载
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Java Excel导入导出
Java的两种方式操作Excel
数据 java excel 导出数据 -
Excel 2016中的新增函数之CONCAT
Excel 2016 新增函数 ifs switch maxifs minifs concat textjoin
Excel 2016 新增函数 ifs