https://github.com/erdian718/lmodoffice
A simple Lua module for converting various office documents into OOXML format files.
https://github.com/erdian718/lmodoffice
docx go lua office ooxml pptx xlsx
Last synced: 7 months ago
JSON representation
A simple Lua module for converting various office documents into OOXML format files.
- Host: GitHub
- URL: https://github.com/erdian718/lmodoffice
- Owner: erdian718
- License: zlib
- Created: 2019-04-30T04:52:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-30T08:51:29.000Z (over 6 years ago)
- Last Synced: 2025-01-29T12:22:48.518Z (8 months ago)
- Topics: docx, go, lua, office, ooxml, pptx, xlsx
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lmodoffice
A simple [Lua](https://github.com/ofunc/lua) module for converting various office documents into OOXML format files.
## Usage
```go
package mainimport (
"ofunc/lmodoffice"
"ofunc/lua/util"
)func main() {
l := util.NewState()
l.Preload("office", lmodoffice.Open)
util.Run(l, "main.lua")
}
``````lua
local office = require 'office'office.toxlsx('path to files')
```## Dependencies
* [ofunc/lua](https://github.com/ofunc/lua)
* [go-ole/go-ole](https://github.com/go-ole/go-ole)## Documentation
### office.toxlsx(root[, ext1, ...])
Converts all files in the root that has the specified extensions to xlsx format files.
If no extension is specified, converts all files in the root.### office.todocx(root[, ext1, ...])
Converts all files in the root that has the specified extensions to docx format files.
If no extension is specified, converts all files in the root.### office.topptx(root[, ext1, ...])
Converts all files in the root that has the specified extensions to pptx format files.
If no extension is specified, converts all files in the root.