npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@pro4biz/activex

v1.0.7

Published

Бібліотека для використання ActiveX компонентів в Node.js

Readme

@pro4biz/activex

npm version License: ISC Node.js Version Electron Version

Бібліотека для інтеграції ActiveX компонентів у ваші Node.js та Electron застосунки

🚀 Особливості

  • Прекомпільовані бінарі - встановлення без компіляції
  • 🔧 Підтримка Node.js та Electron - працює з обома рантаймами
  • 🏗️ TypeScript підтримка - повна типізація для кращого DX
  • 🎯 Кросплатформність - підтримка x64 та ARM64 архітектур
  • Висока продуктивність - оптимізовані нативні біндінги
  • 🛡️ Стабільність - базується на перевіреній бібліотеці node-activex

📦 Встановлення

npm install @pro4biz/activex
yarn add @pro4biz/activex
pnpm add @pro4biz/activex

🎯 Використання

CommonJS

const { ActiveXObject } = require('@pro4biz/activex')

// Створення COM об'єкта
const excel = new ActiveXObject('Excel.Application')
excel.Visible = true

const workbook = excel.Workbooks.Add()
const worksheet = workbook.ActiveSheet

worksheet.Cells(1, 1).Value = 'Привіт, світ!'

ES Modules

import { ActiveXObject } from '@pro4biz/activex'

// Створення COM об'єкта
const shell = new ActiveXObject('WScript.Shell')
shell.Run('notepad.exe')

TypeScript

import { ActiveXObject } from '@pro4biz/activex'

interface ExcelApplication {
  Visible: boolean
  Workbooks: {
    Add(): ExcelWorkbook
  }
}

interface ExcelWorkbook {
  ActiveSheet: ExcelWorksheet
}

interface ExcelWorksheet {
  Cells(
    row: number,
    col: number
  ): {
    Value: any
  }
}

const excel = new ActiveXObject('Excel.Application') as ExcelApplication
excel.Visible = true

const workbook = excel.Workbooks.Add()
const worksheet = workbook.ActiveSheet

worksheet.Cells(1, 1).Value = 'Типізований код!'

📚 Приклади використання

Робота з MS Office

const { ActiveXObject } = require('@pro4biz/activex')

// Excel
const excel = new ActiveXObject('Excel.Application')
excel.Visible = true
const workbook = excel.Workbooks.Add()

// Word
const word = new ActiveXObject('Word.Application')
word.Visible = true
const document = word.Documents.Add()

// PowerPoint
const powerpoint = new ActiveXObject('PowerPoint.Application')
powerpoint.Visible = true
const presentation = powerpoint.Presentations.Add()

Системні операції

const { ActiveXObject } = require('@pro4biz/activex')

// Windows Shell
const shell = new ActiveXObject('WScript.Shell')
shell.Run('calc.exe')

// File System
const fso = new ActiveXObject('Scripting.FileSystemObject')
const file = fso.CreateTextFile('test.txt', true)
file.WriteLine('Тестовий текст')
file.Close()

Робота з базами даних

const { ActiveXObject } = require('@pro4biz/activex')

// ADO Connection
const connection = new ActiveXObject('ADODB.Connection')
connection.Open('Provider=Microsoft.ACE.OLEDB.12.0;Data Source=database.accdb')

const recordset = new ActiveXObject('ADODB.Recordset')
recordset.Open('SELECT * FROM Users', connection)

while (!recordset.EOF) {
  console.log(recordset.Fields('Name').Value)
  recordset.MoveNext()
}

🔧 Системні вимоги

  • Операційна система: Windows 10/11 (ActiveX компоненти доступні тільки в Windows)
  • Node.js: версія 18 або новіша
  • Electron: версія 21 або новіша
  • Архітектура: x64 або ARM64

📋 Підтримувані версії

Node.js

| Версія | Modules | x64 | ARM64 | | ------ | ------- | --- | ----- | | 24 | 137 | ✅ | ✅ | | 23 | 131 | ✅ | ✅ | | 22 | 127 | ✅ | ✅ | | 21 | 120 | ✅ | ✅ | | 20 | 115 | ✅ | ✅ | | 19 | 111 | ✅ | ❌ | | 18 | 108 | ✅ | ❌ |

Electron

| Версія | Modules | x64 | ARM64 | | ------ | ------- | --- | ----- | | 37 | 136 | ✅ | ✅ | | 36 | 135 | ✅ | ✅ | | 35 | 133 | ✅ | ✅ | | 34 | 132 | ✅ | ✅ | | 33 | 130 | ✅ | ✅ | | 32 | 129 | ✅ | ✅ | | 31 | 125 | ✅ | ✅ | | 30 | 123 | ✅ | ✅ | | 29 | 121 | ❌ | ❌ | | 28 | 119 | ❌ | ❌ | | 27 | 118 | ✅ | ✅ | | 26 | 117 | ✅ | ✅ | | 25 | 116 | ❌ | ❌ | | 24 | 114 | ❌ | ❌ | | 23 | 113 | ✅ | ✅ | | 22 | 110 | ✅ | ✅ | | 21 | 109 | ✅ | ✅ |

Легенда:

  • ✅ - Підтримується
  • ❌ - Не підтримується

⚠️ Важливі примітки

  • ActiveX компоненти працюють тільки в Windows
  • Деякі COM об'єкти вимагають відповідних програм (наприклад, Excel для Excel.Application)
  • Завжди закривайте COM об'єкти після використання для уникнення витоку пам'яті
  • У production рекомендується використовувати try-catch блоки

🐛 Відомі проблеми та рішення

Помилка "Class not registered"

// Переконайтеся, що COM компонент зареєстрований
const shell = new ActiveXObject('WScript.Shell')
shell.Run('regsvr32 /s yourcomponent.dll')

Витік пам'яті

// Завжди очищуйте ресурси
const excel = new ActiveXObject('Excel.Application')
try {
  // ваш код
} finally {
  if (excel) {
    excel.Quit()
  }
}

📄 Ліцензія

ISC

🏢 Автор

ПРО-рішення для бізнесу

🙏 Подяки

Ця бібліотека базується на node-activex. Дякуємо за чудову роботу!