VC++是用lixbl读取excel遇到的问题
代码中使用了libxl类,读取excel表,读了几十张表就有两张表出现下面的提示。
提示断点在strlen.asm文件中红色标记的那一行
main_loop:
mov eax,dword ptr [ecx] ; read 4 bytes
mov edx,7efefeffh
add edx,eax
xor eax,-1
提信息为:dataimport.exe 中的 0x1023b130 (msvcr80d.dll) 处未处理的异常: 0xC0000005: 读取位置 0x00000000 时发生访问冲突
Book* book = xlCreateBook();
if (book)
{
if (book->load(filename.c_str()))
{
for (int i = 0; i < book->sheetCount(); i++)
{
Sheet* sheet = book->getSheet(i);
if (sheet)
{
for (int nrow=0; nrow < sheet->lastRow(); nrow++)
{
string strtemp= read_sheet_cell(sheet, nrow, 7);
}
}
}
}
}