OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilot

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilot
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Database

  • Overview of the ecosystem
  • ORM frameworks
    • Java
      • Spring Boot
      • Spring Batch
      • Use Spring JDBC to connect to OceanBase Database
      • Spring Data JPA
      • Hibernate
      • MyBatis
      • jOOQ
    • Python
      • Use SQLAlchemy to connect to OceanBase Database
      • Connect to OceanBase Database by using peewee
      • Use Tortoise ORM to connect to OceanBase Database
    • Go
      • Connect to OceanBase Database by using GORM
      • beego ORM
    • Rust
      • SeaORM Connection to OceanBase Database
      • Diesel Connection to OceanBase Database
    • Ruby
      • Active Record
      • Sequel Connection to OceanBase Database
      • Connect to OceanBase Database by using Ruby on Rails
    • Node.js
      • Sequelize
      • TypeORM
      • Prisma
      • Drizzle
    • C#
      • Dapper
      • SqlSugar
      • FreeSQL
    • PHP
      • Connect to OceanBase Database by using the Yii 2.0 ORM
      • Connect to OceanBase Database by using Laravel Eloquent ORM
      • CakePHP
  • Database version management
    • Liquibase
    • Flyway
  • Data integration
    • Flink
      • Apache Flink
      • Flink DirectLoad
      • Flink Connector OceanBase
    • dbt
    • SeaTunnel
    • Maxwell
    • Debezium
    • Spark Catalog
    • NiFi
    • Qlik Replicate
    • RisingWave CDC
    • Flume
    • Migrate data from SQL Server to OceanBase Database by using MySQL Workbench
  • SQL development
    • WebLogic
    • DBeaver
    • Navicat
    • DataGrip
    • TablePlus
    • DMS
  • Orchestration and scheduling
    • Airflow
    • PowerJob
    • DolphinScheduler
    • Linkis
  • Visualization tools
    • Superset
    • Excel
    • Power BI
    • Quick BI
    • Tableau
    • GuanData
    • vividime
    • DataV
    • Metabase
    • Redash
    • FineReport
  • Database management
    • NineData
    • Bytebase
    • DataHub
    • Zabbix
  • AI
    • OpenAI
    • Qwen
    • LangChain
    • LlamaIndex
    • Dify
    • n8n
    • Trae
    • SpringAI
    • Cline
    • Cursor
    • Continue
    • MCP Toolbox
    • CamelAI
    • Firecrawl
    • Hugging Face
    • Ollama
    • Google Gemini
    • Cloudflare Workers AI
    • DB GPT
    • Jina AI
    • Augment Code
    • Claude Code
    • Kiro
    • GPT4All
  • Application
    • Ghost
    • Jira
    • Seata
    • SAP Crystal Reports
  • Middleware
    • Apache Pulsar

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Database
  3. master

Connect to OceanBase Database in Excel and retrieve data

Last Updated:2026-09-04 07:40:45

Overview
Version compatibility
Prerequisites
Step 1: Obtain the database connection string
Step 2: Configure the ODBC DSN
Step 3: Connect to OceanBase Database
FAQ
References

Overview

Excel is a widely used spreadsheet and data visualization tool. You can directly connect to OceanBase Database through the OceanBase ODBC driver to efficiently query and analyze data.

This topic describes how to connect to OceanBase Database in WPS Office Excel and Microsoft Excel by using an ODBC data source.

Version compatibility

  • OceanBase Database version: ≥ V4.2.5 BP2.

Prerequisites

Before you connect to OceanBase Database in Excel, make sure that:

  • You have installed Excel (WPS Office Excel or Microsoft Excel).
  • You have installed the OceanBase ODBC driver (version ≥ 2.0.9.5hotfix). The driver is not publicly available. Contact OceanBase Technical Support for more information.
  • You have deployed OceanBase Database and created an Oracle or MySQL mode user tenant.## Procedure

Step 1: Obtain the database connection string

Obtain the connection string from the OceanBase Database deployment engineer. For example:

obclient -h$host -P$port -u$user_name -p$password -D$database_name

Parameter description:

  • $host: the connection IP address. For an ODP connection, use the ODP IP address. For a direct connection, use the OBServer IP address.
  • $port: the connection port. For an ODP connection, the default value is 2883. For a direct connection, the default value is 2881.
  • $database_name: the database name.

    Notice

    The user who connects to the tenant must have the CREATE, INSERT, DROP, and SELECT privileges on the database.

  • $user_name: the connection account. For an ODP connection, the format is User@Tenant#Cluster or Cluster:Tenant:User. For a direct connection, the format is User@Tenant.
  • $password: the account password.Here is an example:
obclient -h$host -P2881 -u$user_name -p$password -D$database_name

Step 2: Configure the ODBC DSN

This topic uses an OceanBase Database user tenant in Oracle mode as an example to configure the ODBC DSN. The procedure for an OceanBase Database user tenant in MySQL mode is similar.

  1. Open the system ODBC Data Source Administrator.
  2. In the System DSN or User DSN tab, click Add.
  3. Select the OceanBase ODBC 2.0 Driver driver.
  4. Configure the connection parameters:
    • Data Source Name: enter the DSN name (for example, OBORACLE).
    • Description: optional description.
    • Server name: the OceanBase Database server address (corresponding to $host).
    • Port: the port number (corresponding to $port).
    • Database: the database name (corresponding to $database_name).
    • User name: the username (corresponding to $user_name).
    • Password: the password (corresponding to $password).

Step 3: Connect to OceanBase Database

WPS Office Excel

  1. Open WPS Office Excel.
  2. Navigate to Data → Get Data → Import Data → ODBC DSN.
  3. In the data source selection dialog box, select the configured ODBC DSN (for example, OBORACLE).
  4. Select the tables and fields to import.
  5. In the data filtering and sorting step, you can directly enter an SQL statement to query.
  6. Preview and complete the data import.

Microsoft Excel

  1. Open Microsoft Excel.

  2. Navigate to Data → Get Data → From Other Sources → From ODBC.

  3. Select the configured ODBC DSN (for example, OBORACLE).

  4. In the advanced options, you can directly enter an SQL statement, for example:

    SELECT * FROM T1;
    
  5. Click OK and load the data.

FAQ

How to fix garbled characters when connecting to OceanBase Database? Cause: Outdated ODBC driver version Solution: Upgrade to OceanBase ODBC 2.0.9.5 hotfix or later.

References

  • OceanBase ODBC documentation

Previous topic

Superset
Last

Next topic

Power BI
Next
on this page
Overview
Version compatibility
Prerequisites
Step 1: Obtain the database connection string
Step 2: Configure the ODBC DSN
Step 3: Connect to OceanBase Database
FAQ
References