发送到FlxGrid内容到MICROSOFT EXCEL.rar

  • PUDN用户
    了解作者
  • Visual Basic
    开发工具
  • 1KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 6
    下载次数
  • 2005-09-22 01:38
    上传日期
通过函数将 FlxGrid中的内容输出到Excel表格
发送到FlxGrid内容到MICROSOFT EXCEL.rar
  • www.pudn.com.txt
    218B
  • 发送到FlxGrid内容到MICROSOFT EXCEL.txt
    2.9KB
内容介绍
'***************************** '***************************** '通 过 发 送 到MICROSOFT EXCEL 实 现 表 格 打 印 '***************************** Public Function SendExcel(mFlex As MSFlexGrid, title As String, sumRow As Integer, sumCol As Integer) On Error GoTo s1 Ax = 0 By = 0 Dim i As Integer Dim j As Integer Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet Dim str(21) As String Dim strT(21) As String Dim intT(21) As String Set xlApp = CreateObject("Excel.Application") xlApp.Visible = True Set xlBook = xlApp.Workbooks.Add Set xlSheet = xlBook.Worksheets(1) xlSheet.Cells(1, 1) = title '生成表格 For i = 0 To sumRow - 1 mFlex.row = i For j = 0 To sumCol - 1 mFlex.col = j If IsNull(mFlex.Text) = False Then If strT(j) = "" Then If mFlex.MergeCol(j) = True Then str(j) = Chr(65 + j) strT(j) = Trim(mFlex.Text) intT(j) = i + 3 End If xlSheet.Cells(i + 3, j + 1) = Trim(mFlex.Text) Else If strT(j) <> Trim(mFlex.Text) Then xlSheet.Cells(i + 3, j + 1) = Trim(mFlex.Text) strT(j) = Trim(mFlex.Text) End If End If End If Next j Next i Ax = sumRow By = sumCol Dim LeftCol As Integer On Error GoTo s1 '生成边框 If By <= 26 Then xlApp.Range("A3:" & Chr(64 + By) & Ax + 2).Select Else LeftCol = By / 26 If By = 26 * LeftCol Then i = 26 Else i = 0 End If xlApp.Range("A3:" & Chr(64 + LeftCol) & Chr(64 + By - 26 * LeftCol + i) & Ax + 2).Select End If xlApp.Selection.Borders(xlDiagonalDown).LineStyle = xlNone xlApp.Selection.Borders(xlDiagonalUp).LineStyle = xlNone With xlApp.Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With xlApp.Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With xlApp.Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With xlApp.Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With xlApp.Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With xlApp.Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With Set xlApp = Nothing Set xlBook = Nothing Set xlSheet = Nothing Exit Function s1: MsgBox Err.Description End Function
评论
    相关推荐
    • bootstrap 表格
      bootstrap 表格,可以动态编辑,无需跳转页面,使得操作在当前页面就可以完成,页面友好!
    • easyui表格
      easyui表格相关的东西 例子之类 希望可以缓解工作当中的困难
    • 表格排序
      表格排序 tablesort.js jquery-1.9.0.min.js
    • TreeGrid表格
      很有创意的Wpf格式的Grid表格,很有新意呀
    • android表格
      android表格,实现表格点击,手势翻页
    • android表格
      android表格控件,使用java Echarts库实现,通过webview加载html实现,
    • 网络表格
      网络表格 项目设置 npm install 编译和热重装以进行开发 npm run serve 编译并最小化生产 npm run build 整理和修复文件 npm run lint 自定义配置 请参阅。
    • jQuery表格
      基于jQuery实现的超漂亮的表格,类似于Ext脚本框架下实现的表格,功能强大。压缩包里有例子。
    • 网络表格
      网络表格 项目设置 yarn install 编译和热重装以进行开发 yarn run serve 编译并最小化生产 yarn run build 运行测试 yarn run test 整理和修复文件 yarn run lint 自定义配置 请参阅。
    • 调查表格
      调查表格 简介 自由编程营计划书。 技术 HTML CSS 视觉化 Aqui podran ver mi proyecto: ://surveyform02.netlify.app/