Generate sql insert script from excel worksheet

后端 未结 13 1035
情深已故
情深已故 2020-11-28 18:05

I have a large excel worksheet that I want to add to my database.

Can I generate an SQL insert script from this excel worksheet?

13条回答
  •  野性不改
    2020-11-28 18:19

    Use the ConvertFrom-ExcelToSQLInsert from the ImportExcel in the PowerShell Gallery

    NAME
        ConvertFrom-ExcelToSQLInsert
    SYNTAX
        ConvertFrom-ExcelToSQLInsert [-TableName]  [-Path]  
          [[-WorkSheetname] ] [[-HeaderRow] ] 
          [[-Header] ] [-NoHeader] [-DataOnly]  []
    PARAMETERS
        -DataOnly
        -Header 
        -HeaderRow 
        -NoHeader
        -Path 
        -TableName 
        -WorkSheetname 
        
            This cmdlet supports the common parameters: Verbose, Debug,
            ErrorAction, ErrorVariable, WarningAction, WarningVariable,
            OutBuffer, PipelineVariable, and OutVariable. For more information, see
            about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
    ALIASES
        None
    REMARKS
        None
    
        

    提交回复
    热议问题