A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Yes, I had the same problem. See http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macexcel/help-xl-2011s-dir-function-truncates-filename/e72fbf5d-749c-4a55-a77c-e2def6db24d9
I ended-up using AppleScript to get around the issue for now. I created a function that returns an array of files found in the path. I have a separate one to return folders. This could use some error handling, but I just needed to get it working.
You could add some language to the set list to every file to filter for XLSX files only. Google Applescript & "every file" and there are example of how to use something like "whose name contains .xlsx". There may even be a filter for "has the extension" or something like that. Good luck.
The argument passed to the function needs to be the full path in Apple format ... HardDrive:Users:....
Public Function myFilesystem_GetArrayOfFolderFiles(theFullPath)
thisPathFileArray = MacScript("set list_of_file_names to {}" & Chr(13) & _
"tell application ""Finder""" & Chr(13) & _
"set the source_folder to """ & theFullPath & """ as alias" & Chr(13) & _
"set file_list to (every file in source_folder) as alias list" & Chr(13) & _
"repeat with current_file in file_list" & Chr(13) & _
"set current_file_name to (the name of current_file)" & Chr(13) & _
"copy current_file_name to the end of list_of_file_names" & Chr(13) & _
"end repeat" & Chr(13) & _
"return list_of_file_names" & Chr(13) & _
"end tell")
MyArray = Split(thisPathFileArray, ",")
myFilesystem_GetArrayOfFolderFiles = MyArray
End Function