fastexcel
fastexcel copied to clipboard
Adding information about the author of the comment.
Hi, could you extend the fast-excel API with the ability to add, also, information about the author of the comment?
After generating the excel file, I unfortunately have a rather ugly comment.
The current implementation as you can see is quite flawed.
void writeComments(Writer w) throws IOException {
w.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
w.append("<comments xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">");
w.append("<authors><author/></authors>");
w.append("<commentList>");
for (Map.Entry<Location, String> entry : cache.entrySet()) {
Location location = entry.getKey();
w.append("<comment ref=\"");
w.append(location.toString());
w.append("\" authorId=\"0\"><text><t>");
w.appendEscaped(entry.getValue());
w.append("</t></text></comment>");
}
w.append("</commentList></comments>");
}
https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.comments?view=openxml-3.0.1