A Microsoft Excel add-in that enables seamless integration between Excel and Databricks, allowing users to connect directly to Databricks SQL warehouses, run queries, and import data into Excel spreadsheets with just a few clicks.
- SQL Query Integration: Execute SQL queries directly from Excel and view results immediately
- AI/BI Genie Mode: Use natural language to query your data with Databricks AI/BI Genie
- Excel Cell References: Reference Excel cells directly in your SQL queries with
${A1}
syntax - Flexible Data Import: Import data directly into Excel worksheets with options for:
- Creating new sheets
- Specifying start cells
- Appending to existing data
- Connection Management: Save connection details for quick access to your Databricks environment
- Enhanced Data Viewing: Results panel with pagination and adjustable rows per page
- Auto-formatting: Auto-fit columns for better readability in Excel
- Microsoft Excel (Office 365 or Excel 2016+)
- A Databricks workspace with SQL warehouse access
- Node.js and npm for development
- Download the latest release from the Releases page
- Open Excel and go to the "Insert" tab
- Click on "Office Add-ins"
- Choose "Upload My Add-in" and select the downloaded manifest file
-
Clone the repository:
git clone https://github.com/jayantsing-db/excel-databricks-connector.git cd excel-databricks-connector
-
Install app dependencies:
cd app npm install
-
Install server dependencies:
cd ../server npm install
-
Generate SSL certificates for development:
cd ../app npx office-addin-dev-certs install
-
Start the development servers:
# Start the frontend server in the app directory npm start # Start the proxy server in the server directory (in a separate terminal) cd ../server npm start
-
Sideload the add-in in Excel:
- Open Excel
- Go to Insert > My Add-ins > Upload My Add-in
- Browse to the project folder and select the manifest.xml file
- Launch the add-in in Excel
- Enter your Databricks host URL (e.g.,
https://dbc-xxxxxxxx-xxxx.cloud.databricks.com
) - Enter your personal access token for authentication
- Provide your SQL warehouse ID
- Write your SQL query in the query text area
- You can use Excel cell references in your query with
${A1}
or${Sheet1!B2}
syntax
- You can use Excel cell references in your query with
- Set your preferred results destination (optional):
- Choose a specific start cell
- Create a new sheet for results
- Append to existing data
- Click "Run SQL Query" to execute and import the data
- Switch to "AI/BI Genie" tab
- Enter your Databricks host URL and personal access token
- Enter your Genie Space ID (found in your Genie Space URL)
- Ask a question about your data in natural language
- View the generated SQL and results
- Ask follow-up questions to refine your analysis
- Your Databricks host URL is stored in localStorage for convenience
- Personal access tokens are never stored and must be re-entered for each session
- All queries are executed via a proxy server to avoid CORS issues
- Keep your personal access tokens secure and do not share them
excel-databricks-connector/
├── app/ # Main add-in interface files
│ ├── app.css # Styles for the add-in
│ ├── app.js # Main application logic
│ ├── assets/ # Static assets
│ ├── function-file.html # Function file for add-in commands
│ ├── index.html # Main HTML interface
│ └── manifest.xml # Add-in manifest
├── server/ # Proxy server for Databricks API calls
│ ├── package.json # Server dependencies
│ └── server.js # Server implementation
├── package.json # Project dependencies and scripts
└── README.md # Project documentation
- Frontend changes are made in the
app
directory - API proxy and backend logic is in the
server
directory - Update the manifest.xml file if you're changing permissions or add-in metadata
cd app
npm run build
This creates a production-ready build in the dist
folder.
- CORS Issues: If you encounter CORS errors, make sure the proxy server is running
- Certificate Errors: For development, ensure you've installed the dev certificates
- Authentication Errors: Verify your personal access token has the correct permissions
Contributions are welcome! Please feel free to submit a Pull Request or open an Issue.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- This project is not officially affiliated with Databricks
- Inspired by the need for easier data access between Excel and Databricks
Jayant Singh - @jayantsing_db
Project Link: https://github.com/jayantsing-db/excel-databricks-connector