What are macid filetypes in excel vba

落花浮王杯 提交于 2021-02-05 11:36:44

问题


What are all the possible MacID("filetype") I need the one specifically for CSV but i couldn't find a list anywhere online surprisingly.


回答1:


First run:

mdls "FileName"

Find the TypeCode in the Output:

kMDItemFSTypeCode = "TEXT"

You can use:

Dir(Path,MacID("TEXT"))



回答2:


Just a little aside for this thread.

Yes there are few places to find details of the MacIDs, but beware.

If a file is create on a PC it may not have its MacID set correctly, or at all for that matter.

I am working with Excel files created on both platforms. The XLSX ID is correct if the file is made on Mac but is empty if made on PC.

I have found the best solution is to ignore both forms of wildcards for the two platforms and instead just load all files and use the extension .xlsx

Hope this helps someone

Bob J.



来源:https://stackoverflow.com/questions/13292376/what-are-macid-filetypes-in-excel-vba

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!