发一个到我信箱,ok?
[email protected]

解决方案 »

  1.   

    发一个到我信箱,ok?
    [email protected]
      

  2.   

    [email protected]
    please send me one 
    btw:有无将execel数据导入dbgrid或者sql的好方法啊
      

  3.   

    我现在正需要,发一个到信箱 [email protected]
      

  4.   

    [email protected]
    学习学习
      

  5.   

    [email protected]谢谢!!!!!!!!!
      

  6.   

    谢谢
    学习学习
    [email protected]
    或者
    [email protected]
      

  7.   

    请发一份给我谢谢!
    [email protected]
      

  8.   

    [email protected]
    学习学习
      

  9.   

    有空给我发一个如何
    [email protected]
      

  10.   

    请发一份给我,谢谢
    [email protected]
      

  11.   

    我也要,给我发一个。[email protected]
      

  12.   

    给我发一个吧,[email protected]
      

  13.   

    给我一个好么,我有一个通过dbgrid直接打印的控件
    [email protected]
      

  14.   

    给我一个好吗?,[email protected],谢谢!!!!
      

  15.   

     示例中,dbgrid(DBGrid1)具有一个弹出菜单,它给出两个选项:"Send to Excel" 和 "Copy".
      下面给出用到的方法:
      //注意:下面的方法必须包含 ComObj, Excel97 单元
      //----------------------------------------------------------- 
      // if toExcel = false, export dbgrid contents to the Clipboard 
      // if toExcel = true, export dbgrid to Microsoft Excel 
      procedure ExportDBGrid(toExcel: Boolean); 
      var 
        bm: TBook; 
        col, row: Integer; 
        sline: String; 
        mem: TMemo; 
        ExcelApp: Variant; 
      begin 
        Screen.Cursor := crHourglass; 
        DBGrid1.DataSource.DataSet.DisableControls; 
        bm := DBGrid1.DataSource.DataSet.GetBook; 
        DBGrid1.DataSource.DataSet.First; 
      
        // create the Excel object 
        if toExcel then 
        begin 
          ExcelApp := CreateOleObject('Excel.Application'); 
          ExcelApp.WorkBooks.Add(xlWBatWorkSheet); 
          ExcelApp.WorkBooks[1].WorkSheets[1].Name := 'Grid Data'; 
        end; 
      
        // First we send the data to a memo 
        // works faster than doing it directly to Excel 
        mem := TMemo.Create(Self); 
        mem.Visible := false; 
        mem.Parent := MainForm; 
        mem.Clear; 
        sline := ''; 
      
        // add the info for the column names 
        for col := 0 to DBGrid1.FieldCount-1 do 
          sline := sline + DBGrid1.Fields[col].DisplayLabel + #9; 
        mem.Lines.Add(sline); 
      
        // get the data into the memo 
        for row := 0 to DBGrid1.DataSource.DataSet.RecordCount-1 do 
        begin 
          sline := ''; 
          for col := 0 to DBGrid1.FieldCount-1 do 
            sline := sline + DBGrid1.Fields[col].AsString + #9; 
          mem.Lines.Add(sline); 
          DBGrid1.DataSource.DataSet.Next; 
        end; 
      
        // we copy the data to the clipboard 
        mem.SelectAll; 
        mem.CopyToClipboard; 
      
        // if needed, send it to Excel 
        // if not, we already have it in the clipboard 
        if toExcel then 
        begin 
          ExcelApp.Workbooks[1].WorkSheets['Grid Data'].Paste; 
          ExcelApp.Visible := true; 
        end; 
      
        FreeAndNil(mem); 
      //  FreeAndNil(ExcelApp); 
        DBGrid1.DataSource.DataSet.GotoBook(bm); 
        DBGrid1.DataSource.DataSet.FreeBook(bm); 
        DBGrid1.DataSource.DataSet.EnableControls; 
        Screen.Cursor := crDefault; 
      end; 
      

  16.   

    大哥你真是太好了。别望了我呀。[email protected]
      

  17.   

    给我一个,好吗?谢谢
    [email protected]