excelname$ is not valid name error when using "Export to datatable" command.

  • 20 February 2024
  • 3 replies
  • 50 views

Badge +1

'excelname$' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long. Location: ExcelDB (line 6)

To continue, edit the bot and fix the error. Then, try again.

 

I am getting above error when using select query with where condition in “Export to datatable” command.

Please refer below SQL command i have used.

 

SELECT * INTO [$vSheetName$] from [$vSpreadSheet_Name$$$] where ([Column1] >= 100) and ([Column2]='$vUsername$')

 

Kindly assist what is wrong in the excel name passed by variable $vSpreadSheet_Name$


3 replies

Userlevel 6
Badge +15

Ensure that the variable $vSpreadSheet_Name$ is correctly defined and contains the actual name of the Excel sheet

SELECT * INTO [$vSheetName$] FROM [$vSpreadSheet_Name$] WHERE ([Column1] >= 100) AND ([Column2]='$vUsername$')
 


 

 
Badge +1

I tried to using the variable name as $vSpreadSheet_Name$ then it’s giving me below error:

The Microsoft Access database engine could not find the object '$vSpreadsheet_Name$'. Make sure the object exists and that you spell its name and the path name correctly. If '$vSpreadsheet_Name$' is not a local object, check your network connection or contact the server administrator.

 

Userlevel 6
Badge +15

Verify that you are using a compatible version of Access with the database file you are working on.

Microsoft Access Database Engine 2010 Redistributable

Reply