将非结构化Excel文件导入到ssis [英] Import unstructured Excel file to ssis
问题描述
我有一张excel表没有固定格式,前两行空白。
然后第三行有标题名称,然后再空白到第5行。从第6行开始,它有数据,直到单元格有/////的行(5正斜杠。此处向前,每个单元格都包含左边的标题:和右边的:like(header:value),直到接下来5个正斜杠/////。
i have a excel sheet which has no fixed format which has first 2 rows blank.
then third row has header name, then again its blank up to 5th row. starting from 6th row it has data till the row where cell has /////(5 forward slash., here onward every cell contains header left to the : and value right to the : like(header: value) and it goes till next 5 forward slashes /////.
row 1
row 2(both r blank)
head1 head2 head3 head4 (table one)
data data data data
data data data data
data data data data
data data data data
data data data data
data data data data
data data data data
data data data data
///// (table 2)
head: data
head: data
head: data
head: data
head: data
/////
excel文件看起来像这样(白色空格是空白单元格)。
这些是同一张表中的2个不同的表。我需要导入使用ssis包将2个表分成2个不同的sql表。请帮帮我。
the excel files looks like this(white spaces are blank cells).
these are 2 different tables in same sheet. i need to import there 2 tables into 2 different sql tables using ssis packages. please help me out.
推荐答案
I如果您知道存储数据的范围,您可以在SQL查询中定义它:
If you know the range where data are stored, you can define it in SQL query:
SELECT *
FROM [Sheet1
A6:D20]
请参考以下内容:
Excel连接管理器 [ ^ ]
在SSIS 2008中处理Excel文件 - 经验教训 [ ^ ]
http://www.connectionstrings.com/excel/ [ ^ ]
从.NET应用程序访问Microsoft Office数据 [ ^ ]
Please, refer these:
Excel Connection Manager[^]
Processing Excel files in SSIS 2008 – Lessons Learned[^]
http://www.connectionstrings.com/excel/[^]
Accessing Microsoft Office Data from .NET Applications[^]
这篇关于将非结构化Excel文件导入到ssis的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!