Error: Could not paste table to range. Unable to cast object of type ‘System.Int32’ to type ‘System. String’.
Issue: Receiving error when using the Get Data option in the SmartConnect Excel Add-In.

Root Cause: The column has been named with a reserved word in the data source, which is incompatible with Excel add-ins.
If you’re encountering an error while importing data into Excel and the error message refers to the column name that has reserved word. For Example: “table,” it’s likely because the column name conflicts with Excel’s internal references or naming conventions inside the structured table.
Resolution: Rename the column name (For Example: “tbName”) allowing data to be extracted to Excel using the “Get Data” button.
Guidelines:
Excel has a set of reserved words and special characters that are used for internal references, table names, formulas, and other Excel-specific features. Using these reserved words or characters as column names, table names, or other identifiers can lead to errors or unexpected behavior. Here’s a troubleshooting guide and some potential solutions to address this issue:
- Avoid Reserved Words: Don’t use Excel reserved words as a table, or range names (e.g., TRUE, FALSE, TABLE).
- Use Descriptive Names: Ensure column and table names are meaningful but don’t conflict with reserved names.
- Use Underscores: use underscores (_) or camel case for better readability if possible (e.g., SalesData or Sales_Data).
- No Special Characters: Stick to letters, numbers, and underscores, and avoid symbols or punctuation.
- Avoid using special characters, as they will be automatically replaced with underscores.
- Ensure proper functionality, and make sure all column names are unique. If you have duplicate column names, modify them so that each column has a distinct name. Otherwise, the columns will be extracted with sequential default names, such as Column1, Column2, and so on.
Have a question? Please reach out to us at support@eonesolutions.com