public class ApachePOI {
public static void main(final String[] args) throws Exception {
FileInputStream fis = new FileInputStream("C:\\Mappe1.xlsx");
XSSFWorkbook workbook = new XSSFWorkbook(fis);
POIXMLProperties props = workbook.getProperties();
POIXMLProperties.CoreProperties coreProp = props.getCoreProperties();
coreProp.setCreator("Thinktibits");
coreProp.setDescription("set Metadata using Apache POI / Java");
coreProp.setCategory("Programming");
POIXMLProperties.CustomProperties custProp = props.getCustomProperties();
custProp.addProperty("Author", "Thinktibits");
custProp.addProperty("Year", 2014);
custProp.addProperty("Published", true);
custProp.addProperty("Typist", "tika");
FileOutputStream fos = new FileOutputStream("C:\\Mappe1.xlsx");
workbook.write(fos);
fos.close();
}
}