Tag: 缓冲区

Excel VBA无法读取超过40,000个字符的网页源代码

尝试通过Excel VBA接收网站源代码约4000个字,40000个字符。 然后停止。 我不知道为什么。 谁能帮我? Option Explicit Private Const INTERNET_FLAG_NO_CACHE_WRITE = &H4000000 Private Declare Function InternetOpen Lib "Wininet.dll" Alias "InternetOpenA" (ByVal lpszAgent As String, ByVal dwAccessType As Long, ByVal lpszProxyName As String, ByVal lpszProxyBypass As String, ByVal dwFlags As Long) As Long Private Declare Function InternetReadFile Lib "Wininet.dll" (ByVal hFile As Long, ByVal sBuffer As […]

打开excel文件时缓冲区不能为空错误?

我正在使用Excel库打开电子表格并阅读它的内容,我正在通过互操作库使用这个库,因为互操作库会导致我希望托pipe的服务器计算机上的问题。 https://code.google.com/p/excellibrary/ using ExcelLibrary.SpreadSheet; Stream fileStream = System.IO.File.OpenRead(excelFileName); //FilePath Workbook book = Workbook.Load(fileStream); //Exception thrown Worksheet sheet = book.Worksheets[0]; 运行代码时,您可以看到文件stream加载: 当我走到下一行时,我得到了exception。 缓冲区不能为空。 在stream读取器变成exception之后canRead false: