⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 createexcel.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
字号:
package net.aetherial.gis.our.auto.extend;

import net.aetherial.gis.our.auto.Auto;
import net.aetherial.gis.our.FrameOur;
import org.w3c.dom.Node;
import net.aetherial.gis.surface.ItemValue;
import java.util.Vector;
import net.aetherial.gis.dataType.GPSFile;
import java.io.File;
import net.aetherial.gis.surface.CreateFile;
import net.aetherial.gis.dataType.WptType;
import net.aetherial.gis.our.auto.SubmitTableText;
import net.aetherial.gis.our.auto.SubmitTableTongjiText;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class CreateExcel extends Auto{
  private String directory = "";
  private String n ="";
  private boolean isXZC = false;
  private boolean isNijian = false;
  private boolean isNoLimited = false;
  private final String Table_Type_old = "老表格";
  private final String Table_Type_new = "统计表格";
  private final String Table_Type = Table_Type_new;
  private String excelName = "";
  private double licheng = 0.0;

  public CreateExcel(FrameOur fo) {
    this.setFrameOur(fo);
  }
  public void setSavedDirectory(String path){
    this.directory = path;
  }
  public void setXZC(boolean isXZC){
    this.isXZC = isXZC;
  }
  public void setNijian(boolean nijian){
    this.isNijian = nijian;
  }
  public void createAllFile() {
    if (super.input == null) {
      print("super.input == null");
      return;
    }

    String excel = "";

    SubmitTableTongjiText stt = new SubmitTableTongjiText(this.Table_Type);
    stt.setXuyao_xzc(isXZC);
    stt.setXuyao_nijian(this.isNijian);
    stt.setExcelName(this.excelName);
    stt.setNoLimited(this.isNoLimited);
    excel = excel + stt.getTableTop();
    for (int i = 0; i < this.input.length; i++) {
      this.open(this.input[i]);
      print(this.input[i].getName() + "************************************************");
      stt.setFileName(this.input[i].getName());
      excel = excel + stt.getTableBody();
      this.n = this.n + stt.getLog();
      this.setMemoryReset();
    }
    excel = excel + stt.getTableLast();
    stt.toFile(this.directory + this.excelName+".xml",excel);
    this.createLog(this.directory + "log//"+ItemValue.getDayTimeNumber() + ".log");
    this.licheng = stt.getTableLicheng();
    this.msg("生成Excel文件成功!\nExcel文件是"+this.directory + this.excelName+".xml");
  }
  public double getLicheng(){
    return this.licheng;
  }
  public void setExcelName(String excelName){
    this.excelName = excelName;
  }

  public void setIsNoLimited(boolean isNoLimited) {
    this.isNoLimited = isNoLimited;
  }

  private void createAFile(String savedFileName){

    //stt.toFile(savedFileName,stt.getExcel());
 }


  private void createDirectory(String direct){
    File f = new File(direct);
    if(!(f.exists())){
      f.mkdir();
    }
  }
  private void createLog(String logFile){
    this.createDirectory((new File(logFile)).getParent());
    CreateFile cf = new CreateFile(new File(logFile));
    cf.setEncode("GB2312");
    cf.memoryToFile(this.n);
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -