This is a file \\DMMobile.xlsx and this is a directory \\DMMobile. However, \\DMMobile could be a file without an extension. How does TestComplete know what you are referring to, if you have not explicitly defined the filename?
You're passing in a filename to getExcelData, should that not be SheetTitle? And the function name should be getExcelSheet as you are returning an excel sheet.
function getExcelData(filename)
{
var excelFile = Excel.Open(envVarfolder + "\\DMMobile.xlsx");
var excelSheet = excelFile.SheetByTitle(fileName);
return excelSheet;
}
Name your variables and functions correctly, so that other people can easily read your code.