0

我在使用 grails 导出带有一些标头参数的数据时遇到了一些问题。我使用下面的代码为我的 excel 添加了一些标题参数。但它没有在 Excel 标头中附加标头

response.contentType = grailsApplication.config.grails.mime.types[format]           
response.setHeader( "Content-disposition",
                    "attachment; filename=mytext.${extensionfile}")

Map parameters = [
    title: "Configuration Summary", 
    "column.widths": [0.5, 0.4, 0.3,0.3],
    "header.enabled":"enable",
    "header.rows": 3,
    header: [
        ["Total Price", currency,price],
        ["Base Price",currency,baseprice]
    ],
    "header.parameters": [
        ["colspan0": 1,"colspan1": 1, "colspan2":2],  
        ["colspan0": 1, "colspan1": 1, "colspan2":2]
    ]
]

exportService.export( format, response.outputStream, subCat,
                      fields, labels, formatters, parameters)

请帮我在excel中添加这些标头参数。

4

1 回答 1

0

header.enabled 的值为真/假。

于 2014-08-14T05:04:03.213 回答