Importing from Excel file with lots of tabs and merged cells

  • I received an Excel file that I need to import into SQL. The file has lots of tabs (probably about 90) which is why I want to import it into SQL as I need to combine the data from the tabs.

    I tried importing using the Import/Export wizard, but that crashed and burned without really telling me why. But I figure it is because there are merged cells in the file. I think the file is an export via Crystal Reports.

    What I don't really want to do is go through each tab manually and unmerge all the cells.

    Is there a way through SSIS or something to make SQL handle the merged cells gracefully?

    I've included a sample of how the data is laid out and what cells are merged.

    -- Kit

  • Kit G (11/29/2010)


    I tried importing using the Import/Export wizard, but that crashed and burned without really telling me why. But I figure it is because there are merged cells in the file. I think the file is an export via Crystal Reports.

    Sounds about right, and it's going to hurt. If it was a single tab I'd say swap it back and forth from CSV and then see the results... however...

    What I don't really want to do is go through each tab manually and unmerge all the cells.

    There's VBA out there that can poll your entire workbook and unmerge cells. It's relatively benign. Just make sure you do it in a workbook copy. Nevah trust da intatubes. ๐Ÿ™‚

    Is there a way through SSIS or something to make SQL handle the merged cells gracefully?

    AFAIK, no. I'm hoping someone comes along and proves me wrong, though. ๐Ÿ™‚


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • [Quote]Craig Farrell (11/29/2010)


    Kit G (11/29/2010)


    I tried importing using the Import/Export wizard, but that crashed and burned without really telling me why. But I figure it is because there are merged cells in the file. I think the file is an export via Crystal Reports.

    Sounds about right, and it's going to hurt. If it was a single tab I'd say swap it back and forth from CSV and then see the results... however...

    [/quote]

    Yeah, itโ€™s starting to look like the quest to not have to handle each tab is going to take longer than just handling each tab.

    What I don't really want to do is go through each tab manually and unmerge all the cells.

    There's VBA out there that can poll your entire workbook and unmerge cells. It's relatively benign. Just make sure you do it in a workbook copy. Nevah trust da intatubes. ๐Ÿ™‚

    Nevah! Yeah, the original is safe in my InBox.

    Is there a way through SSIS or something to make SQL handle the merged cells gracefully?

    AFAIK, no. I'm hoping someone comes along and proves me wrong, though. ๐Ÿ™‚

    Youโ€™re not the only one! ๐Ÿ™‚ Iโ€™m beginning to hate Crystal Reports. This is the second file (different file format and different data) Iโ€™ve had to handle from this client thatโ€™s via Crystal Reports.

    -- Kit

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply