Check Excel Macro

  • Thread starter Thread starter Yaro
  • Start date Start date
Y

Yaro

Is there any way to check for existence of macro in a file ( excel or
csv ) before actually opening that file ?. I am designing a site
that allows a user to upload csv file from their local machine to my
webserver. Before processing that file, I need to check whether the
file contains any Macro. Is there any way ?

Thanks in advance for your replies.

Y'o
 
Hi,



If you are going to open them with Excel then before go to

Tools > Macro > Security. then set it to High. No macro will run.
 
without opening excel I'm not sure, but you can open one progmatically and
disable event driven macros when opening (Application.EnableEvents = False)
then check to see if macros exist. For csv files, its not possible to have
a macro in a true csv file, of course someone can change the extension from
xls to csv to make a file appear to be a csv
Paul D
 
Back
Top