require("topsin.excelxs");
try {
    var book = new Book;
    var ok = book.open("test.xlsx");
    if (!ok) throw "open xlsx failed.";
    var sheet = book.getSheet(0);
    var format = book.addFormat();
    format.setPatternForegroundColor('#FF0000');
    format.setFillPattern('SOLID');
    sheet.setCellValue(0, 0, "DIRTY");
    sheet.setCellFormat(0, 0, format);
    book.save();
    book.close();
} catch(e) {
    print(e);
}