Code Monkey home page Code Monkey logo

goexcel's Introduction

goexcel

docker run --name goexcel --log-opt max-size=1m -m 100m -d -p 7781:6060 --restart always suconghou/tools:goexcel

POST ^/xlsx/(.+)\.xlsx$ JSON数据格式

将直接输出生成的文件流

支持两种模式

1. 普通表单模式,上下结构

{
	"Sheet1":{
		"categories":[
			"姓名",
			"入学年份",
			"专业",
			"学历层次",
			"工作单位",
			"职务",
			"就餐",
			"手机号"
		],
		"values":[
			["hello","hihi","aa","3434",677,"6767","666"],
			["hello22","hihi22","aa22","343422","67722","676722","66622"]
		]
	}
}

2. 任意单元格模式

{
	"Sheet1":{
        "dataMaps":{
            "A1":"姓名",
            "B1":"年龄",
            "C1":"手机号",
            "A2":"1",
            "B2":"2",
            "C2":"3"
        }
	}
}

两种模式可以同时使用,第二种模式优先级更高,若有重复会覆盖第一种模式单元格的值.

{
	"Sheet1":{
		"categories":[
			"姓名",
			"入学年份",
			"专业",
			"学历层次",
			"工作单位",
			"职务",
			"就餐",
			"手机号"
		],
		"values":[
			["hello","hihi","aa","3434",677,"6767","666"],
			["hello22","hihi22","aa22","343422","67722","676722","66622"]
		],
		"dataMaps":{
            "A5":"A5",
            "B5":"B5",
            "C5":"C5",
            "A9":"A9",
            "B9":"B9",
            "C9":"C9"
        }
	}
}

参考

https://xuri.me/excelize/en/

goexcel's People

Contributors

suconghou avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.