Chapter 7
Generating Code with Copilot
IN THIS CHAPTER
Downloading the tools needed for Copilot
Learning how to prompt Copilot to generate code
Transferring generated code into Excel
Understanding the limitations of generated code
Artificial intelligence, or AI, has taken the computing world by storm. Microsoft’s horse in the AI race is Copilot. Copilot is capable of a great many things, but in this chapter, you see how it can help write VBA code in Excel. In Chapter 6, you use Excel’s macro recorder to create code based on your actions. Copilot works quite a bit differently from that. On one hand, it’s capable of writing code that the macro recorder can’t, like loops or conditionals. On the other hand, it’s capable of writing code that simply doesn’t work — unlike the macro recorder, which always produces code that runs.
Installing Tools for Copilot
Copilot is a subscription service offered by Microsoft, which means you have to fork over some dough to use it. Fortunately, you can sign up for a 30-day trial if you just want to kick the tires a bit. Point your browser to github.com/features/copilot ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access