LogoLogo
vBase.comvBase App
  • Welcome
    • Welcome to vBase
    • Unique Advantages
    • Core Concepts
      • How vBase Works
      • What is a Stamp?
      • Technical Overview
      • Why Blockchains?
    • Example Use Cases
  • Getting Started
    • Start your Journey
    • Stamping Best Practices
    • Python Quickstart
      • Cloud Notebooks
      • Local Installation
  • Web Tools
    • Stamp an Object
    • Verify an Object
  • Use Case How-Tos
    • Verified Investment Track Records
  • Python SDK
    • Samples
      • Creating a Dataset
      • Adding a Dataset Record
      • Adding a Dataset Record Asynchronously
      • Restoring Dataset Provenance
      • Stamp Interactive Brokers Portfolio
      • Stamp Alpaca Portfolio
    • Windows Setup Guide
    • Package vbase-py
    • Package vbase-py-tools
      • Setup
      • commit_s3_objects
      • verify_s3_objects
  • Other SDKs
    • COM Library Overview
    • Working in Excel
      • Via vBase Workbook
      • Via Excel VBA
    • COM API Reference
    • C#
    • TypeScript
  • Technical Reference
    • Command Line Interface
    • Windows Subsystem for Linux (WSL) Guide
    • GCE S3 Compatible Bucket Setup
    • Smart Contract Addresses
Powered by GitBook
On this page
  • What Functionality is Covered by the vBase COM Library
  • How to use vBase COM library
  1. Other SDKs

COM Library Overview

Previousverify_s3_objectsNextWorking in Excel

Last updated 1 month ago

What Functionality is Covered by the vBase COM Library

This library allows you to create vBase datasets and add records to them.

Data fetching and preparation must be handled on the VBA side by the end user. The library does not implement any data-fetching capabilities from Excel sheets or other sources.

How to use vBase COM library

  1. Uninstall the library if it is already installed on your machine.

  2. Install the new version using the setup.exe in the .

  3. Run Microsoft Excel.

  4. Ensure that the 'Developer' ribbon tab is visible. If it is not, enable it in the Excel options:

    1. Right-click on the ribbon and select 'Customize the Ribbon'.

    2. Check the 'Developer' checkbox in the ribbon tabs tree.

  5. Go to the Developer ribbon tab and click on the 'Visual Basic' button.

  6. In Microsoft Visual Basic for Applications, add a reference to the library: Tools -> References -> find vBase.

  7. The VBA code below demonstrates how to use the library:

Sub BuildAndVerifyDataset()

    On Error GoTo ErrorHandler

    Dim vBaseBuilder As New vBase.vBaseBuilder
    Dim vBaseClient As vBase.vBaseClient
    Dim vBaseDataset As vBase.vBaseDataset
    Dim verificationResult As vBase.verificationResult
    Dim transactionReceipt As vBase.Web3Receipt

    Dim datasetName As String
    Dim forwarderUrl As String
    Dim apiKey As String
    Dim privateKey As String

    datasetName = "<DATASET NAME>"
    forwarderUrl = "<FORWARDER URL>"
    apiKey = "<API KEY>"
    privateKey = "<PRIVATE KEY>"

    Set vBaseClient = vBaseBuilder.CreateForwarderClient(forwarderUrl, apiKey, privateKey)
    Set vBaseDataset = vBaseBuilder.CreateDataset(vBaseClient, datasetName, vBase.ObjectTypes_String)

    Set transactionReceipt = vBaseDataset.AddRecord ("<Record 1 Data>")
    ' Add more records
    Set transactionReceipt = vBaseDataset.AddRecord ("<Record N Data>")

    MsgBox "Last transaction hash: " & transactionReceipt.transactionHash & vbNewLine & "Last transaction timestamp: " & transactionReceipt.timestamp

    Set verificationResult = vBaseDataset.VerifyCommitments()

    MsgBox "Verification passed: " & verificationResult.VerificationPassed

    Exit Sub

ErrorHandler:
    MsgBox "Use [Ctrl+Insert] to copy this message to the clipboard." & vbNewLine & "Error: " & Err.Description, vbCritical

End Sub
vBase COM Setup Files