Dim f As Long
Dim ff
f = frmImport.fpSpread1.GetExcelSheetList(xlsPath, List, ListCount, "c:/1.log", fphandle, True)
If ListCount = 0 Then
MousePointer = vbHourglass
frmImport.fpSpread1.OpenExcel2007File xlsPath, "", -1, -1, "c:/1.log"
MousePointer = vbDefault
Else
frmImport.fpSpread1.SheetCount = 3
frmImport.fpSpread1.ImportExcelSheet 0, 0
End If
用以上代码打开03版的excel可以打开07版附件中的excel,日志文件中报
===== FarPoint Technologies, Inc =====
===== Begin of Excel Workbook General Load =====
2014-8-11 9:07:52
Col Row Information
___ ___ ___________
120:Import Excel File: C:\上报数据文件/44.xlsx
===== End of Excel Workbook General Load =====
System.AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
在 FarPoint.Com.Excel.SpreadDll.SSReset(IntPtr hWnd)
在 FarPoint.Com.Excel.FpExcelStub.OpenExcelEx(IntPtr fpControl, String filename, String logfile, Int16 spreadSheetIndex, Int16 excelSheetIndex, String password) |
-
-
44.rar
6.25 KB, 下载次数: 1431
导入的excel
|