Ask Your Question

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

asked 2015-06-04 03:51:07 +0100

Phoebeyinus gravatar image

updated 2015-08-18 11:41:24 +0100

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(); xModel = ( UnoRuntime.queryInterface(, xSheetdocument); xController = xModel.getCurrentController(); XPropertySet xProp = ( UnoRuntime.queryInterface(, 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); }

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-03-16 12:02:47 +0100

yodalearn13 gravatar image

updated 2019-10-06 22:44:23 +0100

erAck gravatar image

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

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

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-06-04 03:51:07 +0100

Seen: 169 times

Last updated: Oct 06