程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> Delphi >> 一個導出Excel非常快的類

一個導出Excel非常快的類

編輯:Delphi

  unit DBGridEhToExcel;

  interface
  uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, DB, ComCtrls, ExtCtrls, StdCtrls, Gauges, DBGridEh, ShellApi;

  type
    TTitleCell = array of array of String;

    //分解DBGridEh的標題
    TDBGridEhTitle = class
    private
      FDBGridEh: TDBGridEh;  //對應DBGridEh
      FColumnCount: integer; //DBGridEh列數(指visible為True的列數)
      FRowCount: integer;    //DBGridEh多表頭層數(沒有多表頭則層數為1)
      procedure SetDBGridEh(const Value: TDBGridEh);
      function GetTitleRow: integer;    //獲取DBGridEh多表頭層數
      function GetTitleColumn: integer; //獲取DBGridEh列數
    public
      //分解DBGridEh標題,由TitleCell二維動態數組返回
      procedure GetTitleData(var TitleCell: TTitleCell);
    published
      property DBGridEh: TDBGridEh read FDBGridEh write SetDBGridEh;
      property ColumnCount: integer read FColumnCount;
      property RowCount: integer read FRowCount;
    end;

    TDBGridEhToExcel = class(TComponent)
    private
      FCol: integer;
      FRow: integer;
      FProgressForm: TForm;                                  {進度窗體}
      FGauge: TGauge;                                        {進度條}
      Stream: TStream;                                       {輸出文件流}
      FBookMark: TBookmark;                                 
      FShowProgress: Boolean;                         &

[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一頁  >> 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved