July 2, 2002 at 11:32 am
I've tried using DTS, OpenDataSource & OPENROWSET to import an Excel sheet without complete success. Each method works, but some of data in the columns on the Excel sheet imports as nulls and the rows are not in the same order as the sheet and the columns are out of order also.
There is mixed data on all the columns with Text and numbers. So, I've tried formating the Excel cells to TEXT but that doesn't help.
Is there some way to force the import to use the data the way it is on the sheet whether than interpreting it to another data type or reordering it? Or is there a better way of importing from Excel?
July 2, 2002 at 12:17 pm
If there are no indexes, it should insert in the same order, but SQL is not bound by this. Easiest way is to add a clustered index on the columns you need ordering by.
Steve Jones
July 2, 2002 at 12:26 pm
Part of the problem is the sheet within the Excel spreadsheet I'm trying to import from isn't well organized--in that within each sheet there are different sections with different data. I need the data from only one section within the sheet.
If I sort the data it won't sort in the same order as the sheet because of the different sections. I could add a column like an identity column but this sheet is used by alot of people and I'd rather use it the way it is unless that's the last resort.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply