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

📄 printheader.java

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

import net.aetherial.gis.our.auto.extend.ExtractTrackInfo;
import net.aetherial.gis.our.duibi.readXLS.ReadKeYanBaoGao;
import java.io.File;
import java.io.FileOutputStream;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class PrintHeader {
  public PrintHeader() {
    super();
  }


    public static void main(String[] args) throws Exception {

    String header[] = new String[] {
        "<?xml version=\"1.0\"?>",
        "<?mso-application progid=\"Excel.Sheet\"?>",
        "<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"",
        " xmlns:o=\"urn:schemas-microsoft-com:office:office\"",
        " xmlns:x=\"urn:schemas-microsoft-com:office:excel\"",
        " xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"",
        " xmlns:html=\"http://www.w3.org/TR/REC-html40\">",
        " <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">",
        "  <Author>hongfei</Author>",
        "  <LastAuthor>Tao Gang</LastAuthor>",
        "  <LastPrinted>2006-02-22T06:50:50Z</LastPrinted>",
        "  <Created>2006-02-20T06:00:25Z</Created>",
        "  <LastSaved>2006-02-22T06:51:39Z</LastSaved>",
        "  <Company>hengrui</Company>",
        "  <Version>11.6568</Version>",
        " </DocumentProperties>",
        " <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">",
        "  <WindowHeight>9030</WindowHeight>",
        "  <WindowWidth>14700</WindowWidth>",
        "  <WindowTopX>480</WindowTopX>",
        "  <WindowTopY>315</WindowTopY>",
        "  <ProtectStructure>False</ProtectStructure>",
        "  <ProtectWindows>False</ProtectWindows>",
        " </ExcelWorkbook>",
        " <Styles>",
        "  <Style ss:ID=\"Default\" ss:Name=\"Normal\">",
        "   <Alignment ss:Vertical=\"Center\"/>",
        "   <Borders/>",
        "   <Font ss:FontName=\"宋体\" x:CharSet=\"134\" ss:Size=\"12\"/>",
        "   <Interior/>",
        "   <NumberFormat/>",
        "   <Protection/>",
        "  </Style>",
        "  <Style ss:ID=\"s21\">",
        "   <Alignment ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "  </Style>",
        "  <Style ss:ID=\"s22\">",
        "   <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "  </Style>",
        "  <Style ss:ID=\"s23\">",
        "   <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "   <Borders>",
        "    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "    <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "    <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "    <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "   </Borders>",
        "  </Style>",
        "  <Style ss:ID=\"s24\">",
        "   <Alignment ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "   <Borders>",
        "    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "    <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "    <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "    <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "   </Borders>",
        "  </Style>",
        "  <Style ss:ID=\"s25\">",
        "   <Alignment ss:Horizontal=\"Right\" ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "  </Style>",
        "  <Style ss:ID=\"s26\">",
        "   <Alignment ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "   <Borders>",
        "    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "    <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "    <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "    <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "   </Borders>",
        "   <Interior/>",
        "  </Style>",
        "  <Style ss:ID=\"s27\">",
        "   <Alignment ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "   <Borders/>",
        "  </Style>",
        "  <Style ss:ID=\"s28\">",
        "   <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "   <Borders/>",
        "   <Font ss:FontName=\"宋体\" x:CharSet=\"134\" ss:Size=\"12\"/>",
        "  </Style>",
        "  <Style ss:ID=\"s29\">",
        "   <Alignment ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "   <Borders/>",
        "   <Font ss:FontName=\"宋体\" x:CharSet=\"134\" ss:Size=\"12\"/>",
        "  </Style>",
        "  <Style ss:ID=\"s30\">",
        "   <Alignment ss:Horizontal=\"Left\" ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "   <Borders/>",
        "   <Font ss:FontName=\"宋体\" x:CharSet=\"134\" ss:Size=\"12\"/>",
        "  </Style>",
        "  <Style ss:ID=\"s34\">",
        "   <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "   <Borders/>",
        "   <Font ss:FontName=\"宋体\" x:CharSet=\"134\" ss:Size=\"18\"/>",
        "  </Style>",
        "  <Style ss:ID=\"s35\">",
        "   <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:WrapText=\"1\"/>",
        "   <Borders>",
        "    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>",
        "   </Borders>",
        "   <Font ss:FontName=\"宋体\" x:CharSet=\"134\" ss:Size=\"12\"/>",
        "  </Style>",
        " </Styles>",
        " <Worksheet ss:Name=\"Sheet2\">",
        "  <Table ss:ExpandedColumnCount=\"8\" ss:ExpandedRowCount=\"9000\" x:FullColumns=\"1\"",
        "   x:FullRows=\"1\" ss:StyleID=\"s21\" ss:DefaultColumnWidth=\"54\"",
        "   ss:DefaultRowHeight=\"20.0625\">",
        "   <Column ss:StyleID=\"s21\" ss:AutoFitWidth=\"0\" ss:Width=\"33.75\"/>",
        "   <Column ss:StyleID=\"s21\" ss:AutoFitWidth=\"0\" ss:Width=\"63.75\"/>",
        "   <Column ss:StyleID=\"s21\" ss:AutoFitWidth=\"0\" ss:Width=\"123.75\"/>",
        "   <Column ss:StyleID=\"s22\" ss:AutoFitWidth=\"0\" ss:Width=\"93.75\"/>",
        "   <Column ss:StyleID=\"s21\" ss:AutoFitWidth=\"0\" ss:Width=\"93.75\" ss:Span=\"2\"/>",
        "   <Column ss:Index=\"8\" ss:StyleID=\"s21\" ss:AutoFitWidth=\"0\" ss:Width=\"123.75\"/>",

    }
        ;

    String outPutYLH = "成果比较.xml";

    FileOutputStream fos = new FileOutputStream(new File(outPutYLH));

    for (int i = 0; i < header.length; i++) {
      fos.write(header[i].getBytes("UTF-8"));
    }
    fos.flush();
    fos.close();

    System.exit(0);


  }
}

⌨️ 快捷键说明

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