HRESULT:0x800A03EC上Worksheet.range [英] HRESULT: 0x800A03EC on Worksheet.range

查看:119
本文介绍了HRESULT:0x800A03EC上Worksheet.range的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到HRESULT:0x800A03EC上Worksheet.range方法。行数超过70K。 Office 2007中。

I am getting HRESULT: 0x800A03EC on Worksheet.range method. Number of rows are more than 70K. Office 2007.

code:

Microsoft.Office.Interop.Excel.Range neededRange
    = currentWS.Range[cell.Cells[1, 1], cell.Cells[nRowCount, nColumnCount]];

下面我行数超过65530。此功能中断。我观察到当行计数变为超过65530它只打破。

Here my rowcount is more than 65530 . Breaks on this function. I have observed that it breaks only when row count goes more than 65530.

推荐答案

如果您使用的是向后兼容的片材(​​.xls的),而不是的.xlsx出现此问题

This problem occurs if you are using a backwards compatible sheet (a .xls) instead of a .xlsx

要允许表在pre的Office 2007版本中打开它不能包含超过65000行。您可以通过使用CTRL + arrowdown直到你见底检查您的工作表中的行数。如果你试图得到一个范围比行的数量将创造一个更大的错误。

To allow sheets to be opened in pre office 2007 version it can't contain more than 65k rows. You can check the number of rows in your sheet by using ctrl+arrowdown till you hit the bottom. If you try to get a range larger than that number of rows it will create an error

这篇关于HRESULT:0x800A03EC上Worksheet.range的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆