Help!!!The [Hide the Grid lines] did not work when read/wrote the *.xls or *.xlsx files.

Version:LibreOffice 4.4
Question:The [Hide the Grid lines] did not work when read/wrote the *.xls or *.xlsx files.
when set ShowGrid = false, The Grid lines still were displayed。
when set ShowGrid = true and GridColor=Creen, The Grid lines were displayed, but the color did not been changed.

Please check the detail code for setting:

XSpreadsheetDocument xSheetdocument = (XSpreadsheetDocument) UnoRuntime.queryInterface(
XSpreadsheetDocument.class, xComp);
XActionLockable xActionInterface = (XActionLockable) UnoRuntime.queryInterface(
XActionLockable.class, xSheetdocument);
xActionInterface.addActionLock();
com.sun.star.frame.XModel xModel = (com.sun.star.frame.XModel) UnoRuntime.queryInterface(
com.sun.star.frame.XModel.class, xSheetdocument);
com.sun.star.frame.XController xController = xModel.getCurrentController();
XPropertySet xProp = (com.sun.star.beans.XPropertySet) UnoRuntime.queryInterface(
com.sun.star.beans.XPropertySet.class, xController);
//xProp.setPropertyValue(“ShowGrid”, true);
//xProp.setPropertyValue(“GridColor”, new Integer(0x00CC00));
xProp.setPropertyValue(“ShowGrid”, false);

xActionInterface.removeActionLock();
XStorable xStorable = (XStorable) UnoRuntime.queryInterface(XStorable.class, xComponent);

Please check the detail code for saving:
// file save options
PropertyValue[] propertyValue = new PropertyValue[2];
propertyValue[0] = new PropertyValue();
propertyValue[0].Name = “Overwrite”;
propertyValue[0].Value = Boolean.TRUE;
propertyValue[1] = new PropertyValue();
propertyValue[1].Name = “FilterName”;
propertyValue[1].Value = “Calc MS Excel 2007 XML”;

xStorable.storeAsURL(sSaveUrl.toString(), propertyValue);
XCloseable xCloseable =
(XCloseable) UnoRuntime.queryInterface(XCloseable.class,
xComponent);
if (xCloseable == null) {
xComponent.dispose();
} else {
xCloseable.close(false);
}

You can remove gridlines from these simple step: […]

Moderated: spam link removed. This is not a forum to advertise Excel spam links.