如何在asp.net mvc项目中添加node_modules文件?

时间:2019-01-23 18:56:06

标签: asp.net-mvc asp.net-mvc-5

我正在使用this管理面板模板,并且有一些node_modules脚本和文件,例如:

Sub ImportFormatIN3()


    Dim MyPath As String
    Dim TargetFolder As String
    Dim MyFile As String
    Dim LatestFile As String
    Dim latestDate As Date
    Dim LMD As Date

    'Defined path to reports
    MyPath = "R:\filelocation\"
    TargetFolder = "C:\midfilelocation\FinalIN3.txt"

    If Right(MyPath, 1) <> "\" Then MyPath = MyPath & "\"
    MyFile = Dir(MyPath & "*.txt")
    If Len(MyFile) = 0 Then
      Exit Sub
    End If

    'Find the newest file in the mypath
    Do While Len(MyFile) > 0
        LMD = FileDateTime(MyPath & MyFile)
        If LMD > latestDate Then
            LatestFile = MyFile
            latestDate = LMD
        End If
        MyFile = Dir
    Loop

    FileCopy MyPath & LatestFile, TargetFolder

    Dim xlApp As Excel.Application
    Set xlApp = New Excel.Application
    xlApp.Workbooks.Add
    xlApp.Visible = True


    'On Error Resume Next
    With xlApp.ActiveSheet.QueryTables.Add(Connection:="TEXT;midfilelocation\FinalIN3.txt", Destination:=Range("A1"))

        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .TextFilePromptOnRefresh = False
        .TextFilePlatform = 437
        .TextFileStartRow = 1
        .TextFileParseType = xlFixedWidth
        .TextFileTextQualifier = xlTextQualifierDoubleQuote
        .TextFileConsecutiveDelimiter = False
        .TextFileTabDelimiter = True
        .TextFileSemicolonDelimiter = False
        .TextFileCommaDelimiter = False
        .TextFileSpaceDelimiter = False
        .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
        .TextFileFixedColumnWidths = Array(4, 10, 10, 9, 18, 15, 23, 32, 12, 5, 7, 13, 9, 6)
        .TextFileTrailingMinusNumbers = True
        .Refresh BackgroundQuery:=False
    End With
    Rows("1:9").Select
    Selection.Delete Shift:=xlUp
    Columns("A:A").Select
    Selection.Delete Shift:=xlToLeft
    Rows("2:2").Select
    Selection.Delete Shift:=xlUp
    Range("M:M,N:N").Select
    Range("N1").Activate
    Selection.Delete Shift:=xlToLeft
    Columns("K:K").Select
    Selection.Delete Shift:=xlToLeft
    Range("F20").Select


     Columns("D").EntireColumn.Delete
     Columns("H").EntireColumn.Delete
     Columns("I").EntireColumn.Delete
     Columns("G").EntireColumn.Delete
     Columns("C").EntireColumn.Delete
     Columns("A").EntireColumn.Delete


     Columns("A").ColumnWidth = 25
     Columns("B").ColumnWidth = 25
     Columns("C").ColumnWidth = 30
     Columns("D").ColumnWidth = 60
     Columns("E").ColumnWidth = 15


     Range("A1:E1").EntireRow.Insert
     Range("A1:E1").Merge
     Range("A:E").HorizontalAlignment = xlCenter
     Range("A:E").Font.Size = 15
     Range("A1").Font.Size = 30
     Range("A1").Value = "IN3 Dispatch as of " & latestDate


    Dim KillConnects As Long
    With ActiveWorkbook
        For KillConnects = .Connections.Count To 1 Step -1
            .Connections(KillConnects).Delete
        Next KillConnects
    End With

    ActiveWorkbook.SaveAs FileName:="C:\finalfilelocation\FinalIN3Document.xlsx", AccessMode:=xlExclusive, ConflictResolution:=Excel.XlSaveConflictResolution.xlLocalSessionChanges

    ActiveWorkbook.Close

    xlApp.Workbooks.Close

 End Sub

当然没有node_modules文件夹。 我在.net mvc上是新手,在我使用像PHP这样的脚本语言并且在使用npm之前。如何在.net中将其作为编译语言(c#)处理?

0 个答案:

没有答案