devlights / goxcel Goto Github PK
View Code? Open in Web Editor NEWGoxcel is a library to operate Excel using go-ole library.
License: MIT License
Goxcel is a library to operate Excel using go-ole library.
License: MIT License
RangeとCellにメソッドを用意
Hi @devlights your work look very useful. Would you be interested in creating an example for exporting a sheet to a pdf file?
Currently I am using python, similar to what is in
https://www.geeksforgeeks.org/convert-excel-to-pdf-using-python/
But I don't usually use python. It would be neater to do everything in go.
Thanks for reading.
error.go にする
CodeFactor found an issue: Complex Method
It's currently on:
examples\sheet_footer_adjust\footer_adjust.go:13-122
Commit 7af1424
古い形のAPIを使ったサンプルになっているので、Must系に置き換える
Line 80 in 65e0925
HPageBreakとVPageBreakは既に存在するので、RangeとCellにPageBreakを追加、および、WorksheetにResetAllPageBreaksを追加
Line 16 in 1f6f83f
ref: #60
モードは、STAにしておいて、runtime.LockOSThreadでスレッド固定できるように調整する方向で進める。
// Goxcelを動作させるスレッドは一つの goroutine 内で閉じる.
// 別段 goroutine を作る必要はないが、その場合は現在走っている goroutine をスレッド固定することになる
go func() {
// 内部で runtime.LockOSThread を呼び出してスレッド固定。戻り値のrを defer で呼び出し
r, _ := goxcel.Init()
// 内部で runtime.UnlockOSThread を呼び出してスレッド固定解除
defer r()
// 内部で CoInitializeEx(0, ole.COINIT_APARTMENTTHREADED) 呼び出し。後は同じ。
g, gr, _ := goxcel.NewGoxcel()
}()
以下の呼び出しをラップする関数を用意する。(毎回呼び出しを記述するのが面倒なため)
type (
Font struct {
goxcelObj GoxcelObject
comObj *ole.IDispatch
}
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.