电子表格已满

问题描述 投票:0回答:4

我使用 SSIS 将数据插入 Excel。

我遇到以下异常:

'[Excel Destination [32]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft Office Access Database Engine"  Hresult: 0x80004005  Description: "Spreadsheet is full.".'

我使用以下链接做了一些研究:

http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010073849.aspx

它表明您可以填充最多

1,048,576 rows by 16,384 columns

我导入Excel的数据只有大约

100,000 rows by 5 columns

为什么我会遇到此异常?

仅供参考,以下是我的

Data Flow Task

ODBC Source
Data Conversion
转换为
Excel Destination

excel ssis
4个回答
9
投票

解决此问题的最佳方法是使用

Flat File Destination
,然后直接从 Excel 导入
Flat File
。事实证明,这比使用 SSIS 导入 Excel 的速度要好得多,而使用 SSIS 导入 Excel 的速度非常慢。这项工作几乎立即导入了我的数据,而不必等待半小时。


3
投票

我通过将文件更改为 xlsx 并将 excel 版本(属性 excel 连接管理器)更改为 Excel 2007-2010 来排序


1
投票

我通过创建一个空的 EXCEL 文件来解决这个问题,其中包含转换过程中应填充的所有列,并根据 Excel 文件中的这些列创建了一个表。因此,您可以通过选择列并单击可用的“格式化为表格”选项来完成此操作。 Excel 文件准备就绪后,您可以将其另存为 xlsx 扩展名,然后尝试再次加载该 Excel 文件。现在您将能够加载行数较多的 Excel 文件。


0
投票

我的解决方案:

  • 此处安装了 Microsoft Access Database Engine 2016 Redistributable

  • 从 Windows 启动中打开 SQL Server 2019 导入和导出数据(64 位)

  • 选择 Microsoft OLE DB Provider for SQL Server 作为数据源

  • 选择 Microsoft Excel 作为 目标

  • 选择扩展名为 .xlsx 的 Excel 文件的路径(该文件不是预先创建的)。

而且效果非常快。就是这样。

© www.soinside.com 2019 - 2024. All rights reserved.