• Spread基本知识(二)


    1.FpSpread控件,指定单元格获取焦点.

     Me.FpSpread1.ActiveSheet.SetActiveCell(1, 1, False)
    最后一个参数如果为False则,选择新的单元格时,不清除已选择的对象.
     
    2.FpSpread控件,锁定单元格,行,列.
     
      '锁定列
            Me.FpSpread1.ActiveSheet.Columns(0, 1).Locked = True
            Me.FpSpread1.ActiveSheet.Columns(3).Locked = True
     
            '锁定行
            Me.FpSpread1.ActiveSheet.Rows(0).Locked = True
            Me.FpSpread1.ActiveSheet.Rows(2, 3).Locked = True
     
            '锁定单元格
            Me.FpSpread1.ActiveSheet.Cells(4, 5, 6, 9).Locked = True
     
            '锁定区域的背景色
            Me.FpSpread1.ActiveSheet.LockBackColor = Color.Red
            '前景色
            Me.FpSpread1.ActiveSheet.LockForeColor = Color.Blue

    3.FpSpread控件,增加行和列

       Me.ShowMesage(String.Format("当前有 {0} 行 {1} 列", Me.FpSpread1.ActiveSheet.Rows.Count,  
         Me.FpSpread1.ActiveSheet.Columns.Count))
            '增加列
      Me.FpSpread1.ActiveSheet.Columns.Add(Me.FpSpread1.ActiveSheet.Columns.Count, 1)
      '增加行
       Me.FpSpread1.ActiveSheet.Rows.Add(Me.FpSpread1.ActiveSheet.Rows.Count, 1)
       Me.ShowMesage(String.Format("现在有 {0} 行 {1} 列", _
        Me.FpSpread1.ActiveSheet.Rows.Count, Me.FpSpread1.ActiveSheet.Columns.Count))

    4.FpSpread控件,删除行和列

          Me.ShowMesage(String.Format("当前有 {0} 行 {1} 列", Me.FpSpread1.ActiveSheet.Rows.Count, _
                        Me.FpSpread1.ActiveSheet.Columns.Count))
     
            Me.FpSpread1.ActiveSheet.Columns.Remove(10, Me.FpSpread1.ActiveSheet.Columns.Count - 10)
            Me.FpSpread1.ActiveSheet.Rows.Remove(10, Me.FpSpread1.ActiveSheet.Rows.Count - 10)
     
            Me.ShowMesage(String.Format("现在有 {0} 行 {1} 列", _
             Me.FpSpread1.ActiveSheet.Rows.Count, Me.FpSpread1.ActiveSheet.Columns.Count))

  • 相关阅读:
    移动端网络优化
    性能优化之Java(Android)代码优化
    性能优化之布局优化
    性能优化之数据库优化
    Android性能调优
    Android性能检测--traceview工具各个参数的意思
    RDIFramework.NET ━ .NET高速信息系统开发框架钜献 V2.9 版本震撼发布
    【C++基金会 04】vector详细解释
    Chromium-Dev一些缩写
    怎么样CSDN Blog投机和增加流量?
  • 原文地址:https://www.cnblogs.com/zqonline/p/1353918.html
Copyright © 2020-2023  润新知