我有一个SSIS包,目前它有以下步骤:
1 - 文件系统任务 - 复制一个Excel文件(.xlsx)作为SSIS包输出的模板。 Excel文件有3个选项卡 - 其中一个没有数据,但是引用第二和第三个选项卡上的值的公式。这是最终用户查看的页面(我们称之为end_user)。
2 - 数据流任务 - OLEDB源 ->数据转换 -> Excel目标(选项卡2,让我们称其为raw_data)。
3 - 电子邮件任务 - 尚未实现,但将在产品的最后阶段出现,以使其完全自动化。
当包运行完成时,我打开Excel文件,数据已写入raw_data,但是end_user上没有任何显示。这是我已经尝试过的解决方法(在Excel中):
1 - 文件系统任务 - 复制一个Excel文件(.xlsx)作为SSIS包输出的模板。 Excel文件有3个选项卡 - 其中一个没有数据,但是引用第二和第三个选项卡上的值的公式。这是最终用户查看的页面(我们称之为end_user)。
2 - 数据流任务 - OLEDB源 ->数据转换 -> Excel目标(选项卡2,让我们称其为raw_data)。
3 - 电子邮件任务 - 尚未实现,但将在产品的最后阶段出现,以使其完全自动化。
当包运行完成时,我打开Excel文件,数据已写入raw_data,但是end_user上没有任何显示。这是我已经尝试过的解决方法(在Excel中):
- File -> Options -> Formulas -> Automatic (where it already was). And I tried every other choice as well (Automatic except for data tables, Manual, Manual with Recalculate workbook before saving, and back to Automatic).
- Ensured the appropriate data types were selected for each column in raw_data, and end_user [i.e. Number, Currency, Short Date, etc.]
- Tried setting all data field types to General
- Using a different Excel file as a template.
- Copying the formulas into Notepad, putting a random number in place of the formula in Excel, save and close the file, reopen, and put the formula back in.
- Deleting the SSIS Package (.dtsx) and make a new one.
Creating an Excel macro to force formula updates at the time the file is opened.
Private Sub Workbook_Open() Application.Calculation = xlCalculationAutomatic End Sub
Running a Repair on Office.
- Press Ctrl + Alt + F9 in Excel. (This makes the formulas recalculate, and does make the values show up the way they are supposed to.)