请求协助排查SAS Add-In for Excel的*pBookmark参数无效错误
Hey Jordan, let's break down how to troubleshoot this error you're hitting when opening SAS data sources with SAS Add-In for Microsoft Office 7.100.0.2122.
Your Error Details
First, to recap the issue you're seeing:
The parameter *pBookmark is invalid for CPage::Load.
Here's the full exception context you shared:
Exception Type: System.ArgumentException
Message: The parameter *pBookmark is invalid for CPage::Load.
Target Method: GetRows
Call Stack:
at ADODB.RecordsetClass.GetRows(Int32 Rows, Object Start, Object Fields)
at SAS.Servers.Dataset.Read(Int32 startRow)
at SAS.OfficeAddin.Rendering.ExcelDataRenderer.RenderSasData(SasDataSource dataSource, Range destination, RenderState state, RenderOptions options, Int32 cachedRowCount)
at SAS.OfficeAddin.ExcelAddin.ProcessDataView(JobContext context, Range destination)
at SAS.OfficeAddin.ExcelAddin.ProcessDataViews(JobContext context)
at SAS.OfficeAddin.OfficeAddinBase.PostProcessJob(JobContext jobContext, Boolean promptOnErrors)
Troubleshooting Steps to Resolve This
Based on the error stack (which points to ADODB recordset issues and SAS data rendering), try these steps in order:
Repair the SAS Add-In Installation
Corrupted add-in files are a common culprit here. Head to Control Panel > Programs and Features, find "SAS Add-In for Microsoft Office", select "Change", then choose the "Repair" option. Let the repair process run and restart Office afterward.Re-register ADODB Components
The error referencesADODB.RecordsetClass, which means there might be an issue with your system's ActiveX Data Objects libraries. To fix this:- Open Command Prompt as Administrator.
- Run this command (adjust the path if you're on a 32-bit system):
regsvr32 "C:\Program Files\Common Files\System\ado\msado15.dll" - You should get a confirmation message that the registration succeeded.
Test with a Different SAS Dataset
Try loading a small, simple SAS dataset (like a sample dataset provided with SAS) to see if the error persists. If it works with the sample, your original dataset might have corrupted metadata, unsupported data types, or row-level issues that are causing the bookmark parameter to fail.Apply SAS Add-In Patches
Version 7.100.0.2122 might have known bugs related to this error. Check SAS's support resources for available patches for your add-in version—they often release fixes for component interaction problems like this.Verify Office-SAS Compatibility
Make sure your Microsoft Office version is fully compatible with SAS Add-In 7.100.0.2122. Using a newer Office release with an older add-in can lead to unexpected conflicts between components.
内容的提问来源于stack exchange,提问作者jordanw1993

