我看到很多帖子要将.xlsx
文件上传到MySQL,永久数据库表。我想知道如何在Microsoft SQL Server 2014中做到这一点。
我试过了:
BULK INSERT dbo.Cal_table
FROM 'C:\Users\Username\Desktop\Cal.xlsx'
WITH (DATAFILETYPE = 'char',
FIELDTERMINATOR = ',' , --typically this is a comma or tab
ROWTERMINATOR = 'slash n', --or slash r if it's coming from unix/linix
FIRSTROW = 2 --assuming the first row had column names...if not firstrow=1
)
但是,上述方法无效。