qax-os / excelize

Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
https://xuri.me/excelize
BSD 3-Clause "New" or "Revised" License
17.64k stars 1.69k forks source link

Font size of the header and footer doesn't work #1881

Closed huangfuxiangfeng closed 2 months ago

huangfuxiangfeng commented 2 months ago
var (
    scaleWithDoc = true
)
_ = f.SetHeaderFooter("Sheet1", &excelize.HeaderFooterOptions{
    DifferentFirst:   true,
    DifferentOddEven: false,
    ScaleWithDoc:     &scaleWithDoc,
    OddFooter:        "&C第&P/&N页&18",
    EvenFooter:       "&C第&P/&N页&18",
    FirstFooter:      "&C第&P/&N页&18",
})

&18 对页脚字体大小不起任何作用,是我的用法不对吗?

xuri commented 2 months ago

Thanks for your issue. Please declare font size of the header and footer before text part:

OddFooter:   "&C&18第&P/&N页",
EvenFooter:  "&C&18第&P/&N页",
FirstFooter: "&C&18第&P/&N页",

I'll close this issue. If you have any questions, please let me know, and you can reopen this anytime.

huangfuxiangfeng commented 2 months ago

thanks