简体   繁体   中英

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. However, the results of import show null for cells that are merged.

i have tried using IMEX function, testing with values 0,1,2. but it still imports merge cells as 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

Edit: this link may be of use: merged cells behavior

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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