https://github.com/xsoulspace/officejs_dart
Unofficial Office.js (https://github.com/OfficeDev/office-js) wrapper for Flutter/Dart
https://github.com/xsoulspace/officejs_dart
dart dart-package exceljs officejs
Last synced: 3 months ago
JSON representation
Unofficial Office.js (https://github.com/OfficeDev/office-js) wrapper for Flutter/Dart
- Host: GitHub
- URL: https://github.com/xsoulspace/officejs_dart
- Owner: xsoulspace
- Created: 2022-05-21T23:30:55.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-05-31T02:29:10.000Z (about 1 year ago)
- Last Synced: 2025-10-23T07:07:41.294Z (7 months ago)
- Topics: dart, dart-package, exceljs, officejs
- Language: Dart
- Homepage:
- Size: 658 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Unofficial Office.js (https://github.com/OfficeDev/office-js) wrapper for Flutter/Dart
Please note: the package is a Work In Progress and in highly risk of change.
Do not use it in production.
## Features
## Getting started with Excel
To start, add in the index.html "Initialize office" `then` section.
That's all you need to do)
```javascript
window.addEventListener("load", function (ev) {
// Download main.dart.js
_flutter.loader
.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
})
.then(function (engineInitializer) {
return engineInitializer.initializeEngine();
})
.then(function (appRunner) {
return appRunner.runApp();
})
/** Initialize office **/
.then(function () {
console.log("intializing office");
const officeEl = document.getElementById("office");
if (officeEl != null) return;
const scriptTag = document.createElement("script");
scriptTag.src =
"https://appsforoffice.microsoft.com/lib/1/hosted/office.js";
scriptTag.id = "office";
scriptTag.addEventListener("load", () => {
console.log("office loaded");
class OfficeHelpers {
officeOnReady = Office.onReady;
// may cause an error Excel is not defined
runExcel = Excel.run;
}
window["getOfficeHelpers"] = () => new OfficeHelpers();
console.log("helpers injected");
});
document.getElementsByTagName("head")[0].appendChild(scriptTag);
});
});
```
## Getting started with Outlook
To start, add in the index.html "Initialize office" `then` section.
That's all you need to do)
```javascript
window.addEventListener("load", function (ev) {
// Download main.dart.js
_flutter.loader
.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
})
.then(function (engineInitializer) {
return engineInitializer.initializeEngine();
})
.then(function (appRunner) {
return appRunner.runApp();
})
/** Initialize office **/
.then(function () {
console.log("intializing office");
const officeEl = document.getElementById("office");
if (officeEl != null) return;
const scriptTag = document.createElement("script");
scriptTag.src =
"https://appsforoffice.microsoft.com/lib/1/hosted/office.js";
scriptTag.id = "office";
scriptTag.addEventListener("load", () => {
console.log("office loaded");
class OfficeHelpers {
officeOnReady = Office.onReady;
context = Office.context;
}
window["getOfficeHelpers"] = () => new OfficeHelpers();
console.log("helpers injected");
});
document.getElementsByTagName("head")[0].appendChild(scriptTag);
});
});
```
## Donations / Sponsor
Please sponsor or donate to the creator on [Boosty](https://boosty.to/arenukvern) or [CloudTips](https://pay.cloudtips.ru/p/1629cd27).
Thank you for your support and have a great day! 🌄
## Getting Help
If you need help getting started or have questions, check out our [Discord Community](https://discord.gg/y54DpJwmAn).
## Usage
## Additional information