dhatim / fastexcel

Generate and read big Excel files quickly
Other
643 stars 116 forks source link

Fixed custom properties not escaping correctly #408

Closed meiMingle closed 2 months ago

meiMingle commented 2 months ago

Recently I discovered that the values of properties in the code were not escaped, causing an error when the generated file was opened in Excel.This PR will fix it.

try (OutputStream os = ..., Workbook wb = new Workbook(os, "MyApplication", "1.0");) {
    wb.properties()
    .setTitle("title property<=")
    .setTextProperty("Test TextA", "Lucy<=")
    .setHyperlinkBase("https://github.com/search?q=repo%3Adhatim%2Ffastexcel%20fastexcel&type=code");
}

image