[英]How can I transform data in xlsx file removing merge in cells and transposing some columns to ingest data in SQL Server using SSIS?
I have an As-Is spreadsheet data source with merge applied in some columns and for weekly data columns are used in incremental format, eg for the 2019W12 the next column will be populated (R column). 我有一个按原样制作的电子表格数据源,在某些列中应用了合并,并且每周数据列以增量格式使用,例如,对于2019W12,将填充下一列(R列)。
As-Is Spreadsheet Data Source 电子表格数据源
I need parse the spreadsheet content and load into SQL Server table using SSIS and proposed format is: 我需要解析电子表格内容并使用SSIS加载到SQL Server表中,建议的格式为:
Proposed Spreadsheet Data Transformation 拟议的电子表格数据转换
I've tried some alternatives such as apply transformation in SSIS, but column increment case exception in next week load job, I tried to parse and split spreadsheet data with Python (xlrd) but without success to transpose and associate data from columns F to 'N' with columns from A to E. Does anybody faced this type of problem to ingest spreadsheet data using SSIS into SQL Server or have another logical way to transform data before ingestion? 我尝试了一些替代方法,例如在SSIS中应用转换,但是在下周的加载作业中出现了列增量案例异常,我尝试使用Python(xlrd)解析和拆分电子表格数据,但未成功将数据从F列转置和关联到' N',列从A到E。有人会遇到这种类型的问题,即使用SSIS将电子表格数据摄取到SQL Server中吗,还是有另一种逻辑方式在摄取之前转换数据?
Splitting Question into sub tasks 将问题拆分为子任务
Based on your question there are three main functionalities that you are looking to achieve: 根据您的问题,您希望实现三个主要功能:
Possible solution 可能的解决方案
In order to perform a complex transformation you have to do this using one of the following approaches because provides all functionalities that can be done in Microsoft Excel: 为了执行复杂的转换,您必须使用以下方法之一来执行此操作,因为它提供了可以在Microsoft Excel中完成的所有功能:
The solution you are looking for is complex and very specific to the issue, you have to implement the logic at your own. 您正在寻找的解决方案非常复杂,并且非常针对该问题,因此您必须自己实现逻辑。 I will provide some links that can helps you to achieve that: 我将提供一些链接来帮助您实现这一目标:
Helpful Links 有用的网址
Unmerge Cells and fill duplicates values 取消合并单元格并填充重复值
Manipulating Excel files using C# 使用C#处理Excel文件
Transpose Excel Rows 转置Excel行
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.