This week's book giveaway is in the Reactive Progamming forum. We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line! See this thread for details.
Have used this library for the last 3 months with lots of success. However I'm struggling to find a way of hiding the scroll bars for the window of a workbook.
I have looked under the PropertyIdMap class for clues but no such luck. I did find something that could be what I need in WindowOneRecord class, however I can see no way of implementing this and I suspect its not related to what I need. I am using HSSFWorkbook as the class to build the workbook. The reason I wish to hide the scroll bars is due to a workbook containing 7 sheets and I'd rather have the space that the scroll bar takes up for the sheet tabs instead. I'm sure this is something thats shockingly easy to do, I just cant seem to find the documented property key for horizontal scroll bars, any nudge in the general direction of where I need to go would be welcomed with open arms
Let me clarify... you're asking about how the generated document works in Excel, correct? Then do you already know how to do this in Excel, and store it as a feature of the document, and you're just asking how to evoke the same behaviour via POI? If that's the case then perhaps the name of the feature in Excel would be reflected in the name of the POI function or attribute or something.
posted 8 years ago
Thank you for you reply.
Yeah its very easy to do within excel. It is a simple check box called "show horizontal scroll bar" within the advanced options of the excel document. I figured this would exist as a property or something and could be manipulated and controlled within POI.
And is that a feature of the document once you check that box? By which I mean, if you save the document, close Excel, then run Excel again and open the document, does the box come up checked automatically?
posted 8 years ago
If you open a fresh document, hide the scroll bar, save the document, close it, and reopen, the scroll bar is hiden.
Open a fresh document, and it is back. I did already check this, just incase it was a client side option, but it is most def a property saved on the file.
Okay. So it would be possible for POI to provide a way to implement that feature. But whether it has, I have no idea. I would expect it to be a property of the Sheet object, so if it isn't obviously there, perhaps they haven't got around to implementing that yet. You could ask on the POI mailing list, I suppose. And if you were really keen on it (and had the time to spare) you could implement it yourself and contribute it to the project.
Stinging nettles are edible. But I really want to see you try to eat this tiny ad: