Release Please / Release Please (push) Skipped
Release / GoReleaser (push) Skipped
Tests / Secret scan (gitleaks) (push) Skipped
Tests / Test (Go 1.25) (push) Skipped
Tests / Test (Go stable) (push) Skipped
Tests / Secret scan (gitleaks) (pull_request) Successful in 5s
Tests / Test (Go 1.25) (pull_request) Successful in 1m59s
Tests / Test (Go stable) (pull_request) Successful in 2m5s
Add internal/xlspipe (github.com/xuri/excelize/v2) and oo docs put-xlsx to generate multi-sheet budgets with named inputs, SUM/AVG/MIN formulas, cross-sheet links, Russian labels, and cell comments for OnlyOffice. Template cutover-portugal: sheets Ввод, Вс 6.09, Чт 3.09, Ср гип, Сводка. Upload via UploadProjectFileReplacing (--replace default). Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
720 B
Go
27 lines
720 B
Go
package xlspipe
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/xuri/excelize/v2"
|
|
)
|
|
|
|
// Template names for oo docs put-xlsx --template.
|
|
const (
|
|
TemplateCutoverPortugal = "cutover-portugal"
|
|
)
|
|
|
|
// BuildTemplate returns an xlsx workbook for a known template name.
|
|
func BuildTemplate(name string) (*File, error) {
|
|
switch strings.ToLower(strings.TrimSpace(name)) {
|
|
case TemplateCutoverPortugal, "portugal-cutover", "cutover":
|
|
return BuildCutoverPortugalWorkbook(DefaultCutoverPortugal())
|
|
default:
|
|
return nil, fmt.Errorf("unknown xlsx template %q (try: %s)", name, TemplateCutoverPortugal)
|
|
}
|
|
}
|
|
|
|
// File is an alias so cmd/oo can refer to excelize.File without importing excelize in every handler.
|
|
type File = excelize.File
|