简体   繁体   English

SQL Server导入具有合并单元格的Excel数据

[英]sql server importing excel data with merge cells

i have a set of excel data containing merge cells that needs to be imported into sql server. 我有一组Excel数据,其中包含需要导入到SQL Server的合并单元格。 However, the results of import show null for cells that are merged. 但是,导入的结果对于合并的单元格显示为空。

i have tried using IMEX function, testing with values 0,1,2. 我试过使用IMEX函数,测试值为0,1,2。 but it still imports merge cells as null. 但它仍将合并单元格导入为null。 is there a way to this? 有办法吗? thank you 谢谢

SELECT * INTO BenchmarkSurvey FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=C:\Benchmark Survey\Received\Survey1009.xls; Extended Properties="Excel 8.0;IMEX=1"')...[Sheet1$];

See this . 看到这个 Moreover, you can also try to export the excel file to a CSV file and then import it to SQL Server 此外,您还可以尝试将excel文件导出到CSV文件,然后将其导入到SQL Server。

Edit: this link may be of use: merged cells behavior 编辑:此链接可能有用: 合并的单元格行为

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM