java操作Excel的一種方法

搭建環境

 將下載後的文件解包,得到jxl.jar,放入classpath,安裝就完成了。

 基本操作

 一、創建文件

 擬生成一個名爲“測試數據.xls”的Excel文件,其中第一個工作表被命名爲“第一頁”,大致效果如下:

 

 代碼(CreateXLS.java):
  
 //生成Excel的類
 import java.io.*;
 import jxl.*;
 import jxl.write.*;

 public class CreateXLS
 {
 public static void main(String args[])
 {
 try
 {
  //打開文件
  WritableWorkbook book=
 Workbook.createWorkbook(new File(“測試.xls”));
     
 //生成名爲“第一頁”的工作表,參數0表示這是第一頁
   WritableSheet sheet=book.createSheet(“第一頁”,0);
   
 //在Label對象的構造子中指名單元格位置是第一列第一行(0,0)
 //以及單元格內容爲test
   Label label=new Label(0,0,”test”);

   //將定義好的單元格添加到工作表中
   sheet.addCell(label);

   /*生成一個保存數字的單元格
 必須使用Number的完整包路徑,否則有語法歧義
 單元格位置是第二列,第一行,值爲789.123*/
   jxl.write.Number number = new jxl.write.Number(1,0,789.123);
   sheet.addCell(number);

   //寫入數據並關閉文件
   book.write();
   book.close();

  }catch(Exception e)
  {
   System.out.println(e);
  }
 }
 } 

 編譯執行後,會在當前位置產生一個Excel文件。

 三、讀取文件

 以剛纔我們創建的Excel文件爲例,做一個簡單的讀取操作,程序代碼如下:
  
 //讀取Excel的類
 import java.io.*;
 import jxl.*;

 public class ReadXLS
 {
 public static void main(String args[])
 {
  try
  {
   Workbook book=
 Workbook.getWorkbook(new File(“測試.xls”));
   
   //獲得第一個工作表對象
 Sheet sheet=book.getSheet(0);

 //得到第一列第一行的單元格
 Cell cell1=sheet.getCell(0,0);
 String result=cell1.getContents();
 System.out.println(result);

 book.close();

  }catch(Exception e)
  {
   System.out.println(e);
  }
 }
 } 

 程序執行結果:test

 四、修改文件

 利用jExcelAPI可以修改已有的Excel文件,修改Excel文件的時候,除了打開文件的方式不同之外,其他操作和創建Excel是一樣的。下面的例子是在我們已經生成的Excel文件中添加一個工作表:

 //修改Excel的類,添加一個工作表
 import java.io.*;
 import jxl.*;
 import jxl.write.*;

 public class UpdateXLS
 {
 public static void main(String args[])
 {
  try
  {
   //Excel獲得文件
   Workbook wb=Workbook.getWorkbook(new File(“測試.xls”));
   
   //打開一個文件的副本,並且指定數據寫回到原文件
 WritableWorkbook book=
 Workbook.createWorkbook(new File(“測試.xls”),wb);
   
   //添加一個工作表
   WritableSheet sheet=book.createSheet(“第二頁”,1);

   sheet.addCell(new Label(0,0,”第二頁的測試數據”));
   
   book.write();
   book.close();
  }catch(Exception e)
  {
   System.out.println(e);
  }
 }
 } 

 執行結果如圖:

 

 高級操作

 一、 數據格式化

 在Excel中不涉及複雜的數據類型,能夠比較好的處理字串、數字和日期已經能夠滿足一般的應用。

 1、 字串格式化

 字符串的格式化涉及到的是字體、粗細、字號等元素,這些功能主要由WritableFont和WritableCellFormat類來負責。假設我們在生成一個含有字串的單元格時,使用如下語句,爲方便敘述,我們爲每一行命令加了編號:


 WritableFont font1=
 new WritableFont(WritableFont.TIMES,16,WritableFont.BOLD); ①

 WritableCellFormat format1=new WritableCellFormat(font1); ②

 Label label=new Label(0,0,”data 4 test”,format1) ③

 其中①指定了字串格式:字體爲TIMES,字號16,加粗顯示。WritableFont有非常豐富的構造子,供不同情況下使用,jExcelAPI的java-doc中有詳細列表,這裏不再列出。

 ②處代碼使用了WritableCellFormat類,這個類非常重要,通過它可以指定單元格的各種屬性,後面的單元格格式化中會有更多描述。

 ③處使用了Label類的構造子,指定了字串被賦予那種格式。

 在WritableCellFormat類中,還有一個很重要的方法是指定數據的對齊方式,比如針對我們上面的實例,可以指定:

 //把水平對齊方式指定爲居中
 format1.setAlignment(jxl.format.Alignment.CENTRE);

 //把垂直對齊方式指定爲居中
 format1.setVerticalAlignment(jxl.format.VerticalAlignment.CENTRE);

 二、單元格操作

 Excel中很重要的一部分是對單元格的操作,比如行高、列寬、單元格合併等,所幸jExcelAPI提供了這些支持。這些操作相對比較簡單,下面只介紹一下相關的API。

 1、 合併單元格

 WritableSheet.mergeCells(int m,int n,int p,int q); 

 作用是從(m,n)到(p,q)的單元格全部合併,比如:
 WritableSheet sheet=book.createSheet(“第一頁”,0);

 //合併第一列第一行到第六列第一行的所有單元格
 sheet.mergeCells(0,0,5,0);

 合併既可以是橫向的,也可以是縱向的。合併後的單元格不能再次進行合併,否則會觸發異常。

 2、 行高和列寬

 WritableSheet.setRowView(int i,int height);

 作用是指定第i+1行的高度,比如:

 //將第一行的高度設爲200
 sheet.setRowView(0,200);

 WritableSheet.setColumnView(int i,int width);

 作用是指定第i+1列的寬度,比如:

 //將第一列的寬度設爲30
 sheet.setColumnView(0,30);

 jExcelAPI還有其他的一些功能,比如插入圖片等,這裏就不再一一介紹,讀者可以自己探索。 

下面是我的代碼
/*
 * Created on 2005-6-27
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.eapt.uc.ftc.action.printnew;

import java.io.FileInputStream;
import java.io.OutputStream;
import java.util.Calendar;
import java.util.Iterator;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.Region;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.eapt.base.EAPTBaseAction;
import com.eapt.constants.FtcontractConstants;
import com.eapt.query.FtcontractheaderQuery;
import com.eapt.vo.EaptCustomer;
import com.eapt.vo.EaptFtcontractheader;
import com.eapt.vo.EaptFtcontractline;
import com.stony.core.exception.RunException;
import com.stony.core.util.CoreUtils;
import com.stony.core.util.ExcelStyle;

/**
 * @author hardy.wu
 *
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */
public class PrintEXPFtcontractExcelAction extends EAPTBaseAction {

 protected ActionForward doWork(ActionMapping mapping, ActionForm form,
   HttpServletRequest request, HttpServletResponse response)
   throws Exception {

  String ftcontractno = request.getParameter("ftcontractno");

  EaptFtcontractheader ftcontract = FtcontractheaderQuery
    .loadByNoAllLine(new Long(ftcontractno));

  setIsStream(response);

  response.reset();

  response.setContentType("application/vnd.ms-excel");

  response.setHeader("Content-disposition", "attachment; filename="
    + ftcontract.getFtcontractcode() + ".xls");

  OutputStream outputStream = response.getOutputStream();

  exportExcel(request, outputStream, ftcontract);

  return null;

 }

 public void exportExcel(HttpServletRequest request,
   OutputStream outputStream, EaptFtcontractheader ftcontract) {

  EaptCustomer buyer = EaptCustomer.getConstants(ftcontract.getBuyer()
    .getCustomerno());

  EaptCustomer seller = EaptCustomer.getConstants(ftcontract.getSeller()
    .getCustomerno());

  boolean ishk = false;

  POIFSFileSystem fis;

  HSSFWorkbook book;

  HSSFSheet sheet;

  HSSFRow row;

  HSSFCell cell;

  try {

   fis = new POIFSFileSystem(new FileInputStream("c:/p2/expsale.xls"));

   book = new HSSFWorkbook(fis);

   book.setSheetName(0, "sheet1");

   sheet = book.getSheetAt(0);

   // 單元風格
   HSSFCellStyle style1 = ExcelStyle
     .getExpContractExportCellStyle1(book);

   HSSFCellStyle style2 = ExcelStyle
     .getExpContractExportCellStyle2(book);

   HSSFCellStyle style3 = ExcelStyle
     .getExpContractExportCellStyle3(book);

   HSSFCellStyle style4 = ExcelStyle
     .getExpContractExportCellStyle4(book);

   HSSFCellStyle style6 = ExcelStyle
     .getExpContractExportCellStyle6(book);

   HSSFCellStyle style7 = ExcelStyle
     .getExpContractExportCellStyle7(book);

   HSSFCellStyle style8 = ExcelStyle
     .getExpContractExportCellStyle8(book);

   HSSFCellStyle style9 = ExcelStyle
     .getExpContractExportCellStyle9(book);

   HSSFCellStyle style10 = ExcelStyle
     .getExpContractExportCellStyle10(book);

   HSSFCellStyle style11 = ExcelStyle
     .getExpContractExportCellStyle11(book);

   HSSFCellStyle style12 = ExcelStyle
     .getExpContractExportCellStyle12(book);

   // 畫表頭
   row = sheet.getRow(0);

   cell = row.createCell((short) 0);
   cell.setCellStyle(style6);
   CoreUtils.setCellValue(cell, ishk, seller.getCustomernamecn());

   row = sheet.getRow(1);

   cell = row.createCell((short) 0);
   cell.setCellStyle(style7);
   CoreUtils.setCellValue(cell, ishk, seller.getCustomernameen());

   row = sheet.getRow(2);

   cell = row.createCell((short) 15);
   cell.setCellStyle(style1);
   CoreUtils
     .setCellValue(cell, ishk,
       FtcontractConstants.FTCNO_CUSTOMER
         .equals(ftcontract.getFtcontractheader2()
           .getCustomnotype()) ? ftcontract
         .getFtcontractcode2() : ftcontract
         .getFtcontractcode());

   row = sheet.getRow(4);

   Calendar calendar = Calendar.getInstance();
   calendar.setTime(ftcontract.getCustomdate());
   calendar.add(Calendar.DATE, -5);

   cell = row.createCell((short) 15);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, CoreUtils.formatDate(calendar
     .getTime()));

   row = sheet.getRow(5);

   cell = row.createCell((short) 1);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, seller.getFaxphone());

   row = sheet.getRow(6);

   cell = row.createCell((short) 16);
   cell.setCellStyle(style2);
   CoreUtils.setCellValue(cell, ishk, ftcontract
     .getFtcontractheader2().getShipport());

   row = sheet.getRow(7);

   cell = row.createCell((short) 1);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, seller.getTelephone());

   row = sheet.getRow(9);

   cell = row.createCell((short) 2);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, seller.getAddress());

   cell = row.createCell((short) 13);
   cell.setCellStyle(style4);
   CoreUtils.setCellValue(cell, ishk, buyer.getCustomernamecn()
     + "/r/n" + buyer.getCustomernameen());

   row = sheet.getRow(11);

   cell = row.createCell((short) 13);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, buyer.getFaxphone());

   row = sheet.getRow(13);

   cell = row.createCell((short) 13);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, buyer.getAddress());

   row = sheet.getRow(17);

   cell = row.createCell((short) 13);
   cell.setCellStyle(style11);
   CoreUtils.setCellValue(cell, ishk,
     "單        價                           Unit Price("
       + ftcontract.getFtccurrency() + ")");

   cell = row.createCell((short) 18);
   cell.setCellStyle(style12);
   CoreUtils.setCellValue(cell, ishk,
     "總    金    額                                           Total Amount("
       + ftcontract.getFtccurrency() + ")");

   // 循環列出數據

   int i = 0;

   for (Iterator it = ftcontract.getEaptFtcontractlines().iterator(); it
     .hasNext();) {

    EaptFtcontractline ftcontractline = (EaptFtcontractline) it
      .next();

    row = sheet.createRow(18 + i);

    row.setHeightInPoints(40);

    cell = row.createCell((short) 0);
    if (i == 0)
     cell.setCellStyle(style8);
    else
     cell.setCellStyle(style3);
    CoreUtils.setCellValue(cell, ishk, ftcontractline
      .getCustomname());

    cell = row.createCell((short) 9);
    if (i == 0)
     cell.setCellStyle(style9);
    else
     cell.setCellStyle(style10);
    CoreUtils.setCellValue(cell, ishk, ftcontractline.getFtcqty());

    cell = row.createCell((short) 13);
    if (i == 0)
     cell.setCellStyle(style9);
    else
     cell.setCellStyle(style10);
    CoreUtils
      .setCellValue(cell, ishk, ftcontractline.getFtcprice());

    cell = row.createCell((short) 18);
    if (i == 0)
     cell.setCellStyle(style9);
    else
     cell.setCellStyle(style10);
    CoreUtils.setCellValue(cell, ishk, ftcontractline.getAmount());

    sheet.addMergedRegion(new Region(18 + i, (short) 0, 18 + i,
      (short) 8));
    sheet.addMergedRegion(new Region(18 + i, (short) 9, 18 + i,
      (short) 12));

    sheet.addMergedRegion(new Region(18 + i, (short) 13, 18 + i,
      (short) 16));

    sheet.addMergedRegion(new Region(18 + i, (short) 18, 18 + i,
      (short) 19));

    i++;

   }

   // 畫Bottom

   // 總價,允許溢短裝
   row = sheet.createRow(18 + i);

   row.setHeightInPoints(20);

   for (int j = 0; j < 20; j++) {
    cell = row.createCell((short) j);
    cell.setCellStyle(style4);
   }

   sheet.addMergedRegion(new Region(18 + i, (short) 0, 18 + i,
     (short) 2));
   sheet.addMergedRegion(new Region(18 + i, (short) 3, 18 + i,
     (short) 8));
   sheet.addMergedRegion(new Region(18 + i, (short) 9, 18 + i,
     (short) 15));

   cell = row.createCell((short) 0);
   cell.setCellStyle(style4);
   CoreUtils.setCellValue(cell, ishk, "總價/r/nTotal Value");

   cell = row.createCell((short) 3);
   cell.setCellStyle(style4);
   CoreUtils.setCellValue(cell, ishk, ftcontract.getFtccurrency()
     + "     " + ftcontract.getTotalftcamount() + "     "
     + ftcontract.getTradeterm());

   cell = row.createCell((short) 9);
   cell.setCellStyle(style4);
   CoreUtils.setCellValue(cell, ishk, "(允許溢短裝Quantity Allowance  ±");

   cell = row.createCell((short) 16);
   cell.setCellStyle(style4);
   CoreUtils.setCellValue(cell, ishk, CoreUtils
     .formatString(ftcontract.getCategory1()));

   cell = row.createCell((short) 18);
   cell.setCellStyle(style4);
   CoreUtils.setCellValue(cell, ishk, "%)");

   // 裝運期
   row = sheet.createRow(19 + i);
   row.setHeightInPoints(10);

   row = sheet.createRow(20 + i);
   sheet.createRow(21 + i);

   sheet.addMergedRegion(new Region(20 + i, (short) 3, 21 + i,
     (short) 9));
   sheet.addMergedRegion(new Region(20 + i, (short) 12, 21 + i,
     (short) 15));
   sheet.addMergedRegion(new Region(20 + i, (short) 17, 21 + i,
     (short) 18));
   sheet.addMergedRegion(new Region(20 + i, (short) 10, 20 + i,
     (short) 11));

   cell = row.createCell((short) 0);
   cell.setCellStyle(style3);
   CoreUtils.setCellValue(cell, ishk, "裝運期:");

   cell = row.createCell((short) 3);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, "Before     "
     + CoreUtils.formatDate(ftcontract.getFtcontractheader2()
       .getShipdate()));

   cell = row.createCell((short) 10);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, "從:");

   cell = row.createCell((short) 12);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, CoreUtils
     .formatString(ftcontract.getFtcontractheader2()
       .getShipport()));

   cell = row.createCell((short) 16);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, "到:");

   cell = row.createCell((short) 17);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, CoreUtils
     .formatString(ftcontract.getFtcontractheader2()
       .getTargeport()));

   // 21行
   row = sheet.getRow(21 + i);

   sheet.addMergedRegion(new Region(21 + i, (short) 10, 21 + i,
     (short) 11));

   cell = row.createCell((short) 0);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, "Shipment:");

   cell = row.createCell((short) 10);
   cell.setCellStyle(style3);
   CoreUtils.setCellValue(cell, ishk, "From:");

   cell = row.createCell((short) 16);
   cell.setCellStyle(style3);
   CoreUtils.setCellValue(cell, ishk, "To:");

   // draw bottom

   String[] bottomtitles = getBottomTitle();
   String[] bottomdatas = getBottomData(ftcontract);
   float[] bottomheights = getBottomHeight();

   int rn1 = 22 + i;
   for (int j = 0; j < bottomtitles.length; j++) {

    row = sheet.createRow(rn1 + j);

    row.setHeightInPoints(bottomheights[j]);

    sheet.addMergedRegion(new Region(rn1 + j, (short) 0, rn1 + j,
      (short) 2));
    sheet.addMergedRegion(new Region(rn1 + j, (short) 3, rn1 + j,
      (short) 19));

    cell = row.createCell((short) 0);
    cell.setCellStyle(style3);
    CoreUtils.setCellValue(cell, ishk, bottomtitles[j]);

    cell = row.createCell((short) 3);
    cell.setCellStyle(style3);
    CoreUtils.setCellValue(cell, ishk, bottomdatas[j]);

   }

   int rn2 = 39 + i;
   row = sheet.createRow(rn2 + 1);
   row.setHeightInPoints(10);
   row = sheet.createRow(rn2 + 2);
   row.setHeightInPoints(10);

   row = sheet.createRow(rn2 + 3);

   sheet.addMergedRegion(new Region(rn2 + 3, (short) 3, rn2 + 3,
     (short) 4));
   sheet.addMergedRegion(new Region(rn2 + 3, (short) 10, rn2 + 3,
     (short) 14));

   cell = row.createCell((short) 3);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, "買方");

   cell = row.createCell((short) 10);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, "賣方");

   row = sheet.createRow(rn2 + 4);

   sheet.addMergedRegion(new Region(rn2 + 4, (short) 3, rn2 + 4,
     (short) 4));
   sheet.addMergedRegion(new Region(rn2 + 4, (short) 10, rn2 + 4,
     (short) 14));

   cell = row.createCell((short) 3);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, "(The Buyers)");

   cell = row.createCell((short) 10);
   cell.setCellStyle(style1);
   CoreUtils.setCellValue(cell, ishk, "(The Sellers)");

   book.write(outputStream);

  } catch (Exception ex) {

   ex.printStackTrace();

   throw new RunException("error.excel.download");

  }

 }

 public String[] getBottomTitle() {

  String[] bottomtitles = new String[18];

  bottomtitles[0] = "付款方式:";
  bottomtitles[1] = "Payment:";
  bottomtitles[2] = "檢    驗:";
  bottomtitles[3] = "Inspection:";
  bottomtitles[4] = "保    險:";
  bottomtitles[5] = "Insurance:";
  bottomtitles[6] = "仲    裁:";
  bottomtitles[7] = "Arbitration:";
  bottomtitles[8] = "一般條款:";
  bottomtitles[9] = "Ceneral Terms:";
  bottomtitles[10] = "";
  bottomtitles[11] = "";
  bottomtitles[12] = "";
  bottomtitles[13] = "";
  bottomtitles[14] = "";
  bottomtitles[15] = "";
  bottomtitles[16] = "";
  bottomtitles[17] = "";

  return bottomtitles;

 }

 public float[] getBottomHeight() {

  float[] bottomheights = new float[18];

  bottomheights[0] = 10;
  bottomheights[1] = 30;
  bottomheights[2] = 10;
  bottomheights[3] = 20;
  bottomheights[4] = 10;
  bottomheights[5] = 20;
  bottomheights[6] = 20;
  bottomheights[7] = 40;
  bottomheights[8] = 10;
  bottomheights[9] = 20;
  bottomheights[10] = 20;
  bottomheights[11] = 40;
  bottomheights[12] = 10;
  bottomheights[13] = 20;
  bottomheights[14] = 10;
  bottomheights[15] = 10;
  bottomheights[16] = 25;
  bottomheights[17] = 30;

  return bottomheights;

 }

 public String[] getBottomData(EaptFtcontractheader ftcontract) {

  String[] bottomdatas = new String[18];

  bottomdatas[0] = "BY    "
    + CoreUtils.formatString(ftcontract.getPaymentmark());
  bottomdatas[1] = "口By 100% confirmed&irrevocable L/C to be available by        days sight,reaching the sellers         before the date of shipment,remaining valid for in China for further 15 days after the prescribed time of shpment,allowing transhipment&Partial Shipments. ";
  bottomdatas[2] = "品質、數量、重量以中華人民共和國進出口商品檢驗局的檢驗證或賣方所出之證明書爲最後依據。";
  bottomdatas[3] = "Quality,quantity and weight certified by Import & Export Commodity Inspection Bureau of the P.R.of China or the Sellers. As per the former`s Inspection Certificate of the latter`s certificate,are to be taken as final.";
  bottomdatas[4] = "";
  bottomdatas[5] = "口To be effected by the buyers.   口To be effected by the sellers at 110% of invoice value          covering as per China Insuranec Clauses (C.I.C.)";
  bottomdatas[6] = "凡因執行本合同所發生的或與本合同有關的一切爭議,應由雙方通過友好協商解決;如果協商不能解決,應提交中國國際經濟貿易仲裁委員會根據該會的仲裁規則進行仲裁,仲裁地點在北京,仲裁裁決是終局的對雙方都有約束力";
  bottomdatas[7] = "口All disputes arising from the execution of,or in connection with this contract, shall be settled amicably through friendly negotiation.`Incase no settlement can be reached through negotiation,the case shall then be submitted to the China International Economic and Trade Arbitration Commission,Beijing,for arbitration in accordance with its rules of procedure.The arbitral award is final and is final and binding upon both paries.";
  bottomdatas[8] = "1.質地、重量、尺寸、花型、顏色均允許合理差異。對合理範圍內差異提出的索賠,概不受理。";
  bottomdatas[9] = "Reasonable tolerance in quality,weight,measurements,designs and colours is allowed,for which no claims will be entertained.";
  bottomdatas[10] = "2.買方對下列各點所造成的後果承擔全部責任: (甲)買方要求賣方使用買方的特定裝潢,花型圖案商票等;(乙)不及時提供生產所需的規格或其他細則;(丙)不按時開信用證;(丁)信用證條款與售貨合同不相符而不及時修改。";
  bottomdatas[11] = "Buyers are to assume full responsibilities for any consequences arising from:(a)the use of packing,designs or brand pattern made to order;(b)late submission of specifications of any details necessary for the execution of this Sales Contract;(c)late establishment of L/C:(d)late amendment to L/C inconsistent with the provisions of this Sales Contract.";
  bottomdatas[12] = "3.人力不可抗拒的事故造成延期或無法交貨者,賣方不負任何責任。";
  bottomdatas[13] = "Sellers are not responsible for late or non-delivery in the event of force majeure of any contingences beyond sellers control.";
  bottomdatas[14] = "4.凡有對裝達的貨物質量提出索賠者,必須在貨到目的港後30天內提出。";
  bottomdatas[15] = "Claims,if any,concerning the goods shipped should be filed within 30 days after arrival at destination.";
  bottomdatas[16] = "5.買方應在收到本售貨合同後十天內簽退一份給賣方。如在此期限內不提任何異議,本售貨合同即生效。憑買方定單或買方先前之確認而繕制的售貨合同發出後即生效。非經雙方同意,不得更改或撤銷。";
  bottomdatas[17] = "Buyers should sign one copoy of this Sales contract and return it to sellers within 10 bays after receipt,If nothing is proposed to the contrary within that time,this Sales Contract will be to neither modification nor cancellation,unless agreed upon by both parties.";

  return bottomdatas;
 }

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章