Is there any way to run an Excel Macro in CSV file format?
I am exporting a file to CSV using a csv template, Is it possible to write macros on the template which is in CSV format. I cant have it in XLS format. Can anyone help me on this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
While you can’t save a macro inside a
CSVfile you can eitherCSVusing a controller workbook, or an addinCSVfile (for example to add an Event handler)If you provide more information as to what you need to do then we can help with the paths above.
(Edit: it still isn’t clear how the CSV file is generated – is this done via Excel or by another app?]
Using Pearson’s Application Events example you could use the code at bottom (from an open Excel controller workbook) to capture the addition of a new
CSVfile and then format it.If you need to catch the creation of the
CSVfile on the fly then a more complex approach such as using VBscript with WMI is necessary.Controller Workbook ApproachThisWorkbook Module
class module called CExcelEvents