• December 21, 2024
  • Updated 9:35 pm

How to use ChatGPT in Excel and Word?

Do you want to know how to use ChatGPT in Excel and Word and maximize your task management? It is no secret that Microsoft knew how to identify the potential of Artificial Intelligence when OpenAI launched ChatGPT at the end of 2022. Hence the company founded by Bill Gates began collaborating with Sam Altman ‘s company to integrate this advanced technology into its entire suite of software, from Windows to Office, including the Microsoft Edge browser.

The Microsoft Copilot tool is natively integrated into Windows and Edge at no cost. In addition, there is a paid version for all Office applications such as Word, Excel, PowerPoint and even Outlook. Microsoft AI for Office can automate a variety of tasks, from writing documents using information from other files to creating chart-based tables or presentations from a Word document.

This subscription, aimed mainly at companies, has a high cost. However, home users can also take advantage of it, as long as they are willing to pay for the service. For those who prefer free options, the GPT for Excel Word add-in is available, accessible from the store of both applications.

ChatGPT integration in Word and Excel

ChatGPT integration through this extension allows Excel users to apply the same formula to a specific range of cells without manual copy and paste, avoiding errors and saving time. This function is done through simple text instructions.

In addition, the plugin makes it easy to perform Internet searches to extract filtered content and add it directly in table format, including links to the corresponding sources. In Word, the integration is similar to that used in Edge, offering the ability to ask questions about a document, extract summaries of important information, translate texts, and much more.

It also provides writing suggestions and allows you to completely rewrite a document or a selected section, which is a great help for those who are interested in how to use ChatGPT in Excel and Word.

This plugin is free, although limited to a certain number of requests to the servers through the API. If this number is exceeded, it is possible to purchase token packs to continue using it. Even so, it is a cheaper option than the Copilot Artificial Intelligence subscription in Office. Additionally, when using the ChatGPT API, document data is not used to train OpenAI AI models.

Read Also: Best Free AI Tools for Mobile

How to use ChatGPT in Excel and Word?

Using ChatGPT in Excel and Word involves integrating the AI capabilities to assist with tasks such as generating text, summarizing content, analyzing data, and more. Here’s a step-by-step guide on how to achieve this:

Using ChatGPT in Microsoft Word

Add-ins for Office

Microsoft Office allows integration with various add-ins. To use ChatGPT, you can leverage some existing AI-powered add-ins.

Install Add-in:

  • Open Microsoft Word.

  • Go to the Insert tab.

  • Click on Get Add-ins.

  • Search for add-ins like “Wordtune”, “Grammarly”, or other AI writing assistants. Note that while these are not specifically ChatGPT, they provide similar AI-driven capabilities.

Using the Add-in:

  • Once installed, you can usually find the add-in in the Home tab or in the add-ins section.

  • Open the add-in and follow its instructions to use AI-powered features.

API Integration

If you want to use OpenAI’s ChatGPT directly, you can integrate it using APIs.

Get API Key:

Sign up at OpenAI and get your API key.

Use a Script:

You can use VBA (Visual Basic for Applications) to write a script that calls the OpenAI API. This requires some programming knowledge.

Here’s an example of how you might set up a basic VBA script in Word to call the ChatGPT API:

Sub CallChatGPTAPI()

Dim http As Object

Set http = CreateObject(“MSXML2.XMLHTTP”)

Dim apiKey As String

apiKey = “your_openai_api_key”

Dim url As String

url = “https://api.openai.com/v1/engines/davinci-codex/completions”

Dim params As String

params = “{“”prompt””: “”Your text here””, “”max_tokens””: 150}”

With http

.Open “POST”, url, False

.setRequestHeader “Content-Type”, “application/json”

.setRequestHeader “Authorization”, “Bearer ” & apiKey

.send params

End With

MsgBox http.responseText

End Sub

This script sends a prompt to the ChatGPT API and displays the response in a message box.

Using ChatGPT in Microsoft Excel

Add-ins for Excel

Similar to Word, you can use add-ins in Excel.

Install Add-in:

  • Open Microsoft Excel.

  • Go to the Insert tab.

  • Click on Get Add-ins.

  • Search for relevant AI or data analysis add-ins.

Using the Add-in:

Once installed, you can access the add-in from the Home tab or the add-ins section and follow the usage instructions.

API Integration

To use ChatGPT directly in Excel, you can write a VBA script that calls the OpenAI API.

Get API Key:

Obtain your API key from OpenAI.

Use a Script:

Here is an example of a VBA script for Excel to call the ChatGPT API:

Sub GetChatGPTResponse()

Dim http As Object

Set http = CreateObject(“MSXML2.XMLHTTP”)

Dim apiKey As String

apiKey = “your_openai_api_key”

Dim url As String

url = “https://api.openai.com/v1/engines/davinci-codex/completions”

Dim params As String

params = “{“”prompt””: “”Your text here””, “”max_tokens””: 150}”

With http

.Open “POST”, url, False

.setRequestHeader “Content-Type”, “application/json”

.setRequestHeader “Authorization”, “Bearer ” & apiKey

.send params

End With

Dim response As String

response = http.responseText

‘ Display the response in a message box or write it to a cell

MsgBox response

‘ Range(“A1”).Value = response

End Sub

This script sends a prompt to the ChatGPT API and displays the response.

This tool, how to use ChatGPT in Excel and Word, represents a revolution in the automation of tasks within Excel and Word, allowing users to perform complex actions more efficiently and accurately. The ability to apply formulas in bulk and perform filtered searches directly from Excel greatly improves productivity. On the other hand, in Word, the possibility of generating summaries, obtaining writing suggestions and automatically translating texts are functions that save time and improve the quality of work.

Read Also: 5 AI tools for Excel: How to use Artificial Intelligence in your spreadsheets

Conclusion

The integration of ChatGPT in Excel and Word through the GPT for Excel Word add-in offers an accessible and powerful solution for those looking to take advantage of Artificial Intelligence in their daily tasks. With features ranging from formula automation to content generation and translation, this free tool positions itself as a viable option for both business and home users.

For those who want to explore how to use ChatGPT in Excel and Word, this add-in offers a practical and affordable option. Leveraging this technology can significantly transform the way documents are managed and produced, providing benefits in efficiency and accuracy.

Dev is a seasoned technology writer with a passion for AI and its transformative potential in various industries. As a key contributor to AI Tools Insider, Dev excels in demystifying complex AI Tools and trends for a broad audience, making cutting-edge technologies accessible and engaging.

Leave Your Comment