We're getting closer! Here's what I have:
FileInputStream xlsFileStream = new FileInputStream(xlsxInput);
XSSFWorkbook wb = new XSSFWorkbook(xlsFileStream);
xlsFileStream.close();
POIXMLProperties p = wb.getProperties();
CTProperty[] properties =
p.getCustomProperties().getUnderlyingProperties().getPropertyArray();
for (int i = 0; i < properties.length; i++)
{
if (properties[i].getLinkTarget() == null)
{
if (properties[i].isSetLpwstr())
{
properties[i].unsetLpwstr();
}
}
}
p.commit();
OutputStream out = new FileOutputStream(xlsxInput);
wb.write(out);
out.close();
But I get an exception on the wb.write(out); call
java.lang.NoClassDefFoundError:
org/openxmlformats/schemas/spreadsheetml/x2006/main/CTDxfs$1
There is however a CTDxfs.class in that location.
Obviously, I have something wrong, but what?