2

I would like to ask if it's somehow possible to include some code in an XML file?

After an export of my excel file to xml I cannot see it.

My goal is to create excel with macros from xml.

1 Answer 1

1

I think you may be getting confused between saving an XML Data file and an Excel Add-In (you may have seen this called an XML Add-in).

By using Save As and selecting the XML Data file type, Excel will produce an XML file with the data contained only on your worksheets and so no VBA is saved. An Excel Add-In though is a file containing macro information so you can quite easily add the macros it contains to another installation of Excel, I believe this is the goal you are trying to achieve.

This webpage helped me a lot when I first learned how to create add-ins, and it also includes information on creating custom ribbon UI's for your macros; And this webpage contains instructions on adding / removing Add-ins.

Sign up to request clarification or add additional context in comments.

2 Comments

Unfortunately this excel add-in is not working with 64-bit.
@Acla can you elaborate on that with a specific error message? I'm guessing that your specific macro is 32-bit and you're trying to add it to a 64-bit installation of Excel? Try adding PtrSafe after any Declare statements

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.