zoukankan      html  css  js  c++  java
  • excel录制宏的基础上,加了几句(导入文本数据生成折线)

    Sub 宏1()
    '
    ' 宏1 宏
    '
    Name = "test3"
    Worksheets.Add after:=Worksheets(Worksheets.Count)
    ActiveSheet.Name = Name
    '
        With ActiveSheet.QueryTables.Add(Connection:= _
            "TEXT;C:UsersAdministratorDesktop" & Name & ".txt", Destination:=Range("$A$2"))
            .Name = "test"
            .FieldNames = True
            .RowNumbers = False
            .FillAdjacentFormulas = False
            .PreserveFormatting = True
            .RefreshOnFileOpen = False
            .RefreshStyle = xlInsertDeleteCells
            .SavePassword = False
            .SaveData = True
            .AdjustColumnWidth = True
            .RefreshPeriod = 0
            .TextFilePromptOnRefresh = False
            .TextFilePlatform = 936
            .TextFileStartRow = 1
            .TextFileParseType = xlDelimited
            .TextFileTextQualifier = xlTextQualifierDoubleQuote
            .TextFileConsecutiveDelimiter = True
            .TextFileTabDelimiter = True
            .TextFileSemicolonDelimiter = False
            .TextFileCommaDelimiter = False
            .TextFileSpaceDelimiter = True
            .TextFileColumnDataTypes = Array(1, 1)
            .TextFileTrailingMinusNumbers = True
            .Refresh BackgroundQuery:=False
        End With
        Application.Left = 352.75
        Application.Top = 66.25
        Range("B1").Select
        ActiveCell.FormulaR1C1 = "kang_" & Name
        Columns("B:B").Select
        ActiveSheet.Shapes.AddChart.Select
        ActiveChart.ChartType = xlLine
        ActiveChart.SetSourceData Source:=Range(Name & "!$B:$B")
    End Sub
    

      

  • 相关阅读:
    React 生命周期
    React 总结
    系统后台设置
    数据库的事务日志已满,起因为"LOG_BACKUP"。
    webpack 打包器
    地图API
    ES6 与 React
    前端流行的技术
    Javascript 函数声明、函数表达式与匿名函数自执行表达式
    Javascript 解读与思想
  • 原文地址:https://www.cnblogs.com/konkon/p/7680967.html
Copyright © 2011-2022 走看看