Model Context Protocol (MCP) finally gives AI models a way to access the business data needed to make them really useful at work. CData MCP Servers have the depth and performance to make sure AI has access to all of the answers.
Try them now for free →Excel Spreadsheet Automation with the QUERY Formula
Pull data, automate spreadsheets, and more with the QUERY formula.
The CData Excel Add-In for Neo4J provides formulas that can query Neo4J data. The following three steps show how you can automate the following task: Search Neo4J data for a user-specified value and then organize the results into an Excel spreadsheet.
The syntax of the CDATAQUERY formula is the following:
=CDATAQUERY(Query, [Connection], [Parameters], [ResultLocation]);
This formula requires three inputs:
- Query: The declaration of the Neo4J data records you want to retrieve, written in standard SQL.
Connection: Either the connection name, such as Neo4jConnection1, or a connection string. The connection string consists of the required properties for connecting to Neo4J data, separated by semicolons.
To connect to Neo4j, set the following connection properties:
- Server: The server hosting the Neo4j instance.
- Port: The port on which the Neo4j service is running. The provider connects to port 7474 by default.
- User: The username of the user using the Neo4j instance.
- Password: The password of the user using the Neo4j instance.
- ResultLocation: The cell that the output of results should start from.
Pass Spreadsheet Cells as Inputs to the Query
The procedure below results in a spreadsheet that organizes all the formula inputs in the first column.
- Define cells for the formula inputs. In addition to the connection inputs, add another input to define a criterion for a filter to be used to search Neo4J data, such as CategoryOwner.
- In another cell, write the formula, referencing the cell values from the user input cells defined above. Single quotes are used to enclose values such as addresses that may contain spaces.
- Change the filter to change the data.
=CDATAQUERY("SELECT * FROM ProductCategory WHERE CategoryOwner = '"&B5&"'","Server="&B1&";Port="&B2&";User="&B3&";Password="&B4&";Provider=Neo4j",B6)
