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.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Apache POI - How to hide Scroll Bars?

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 24654
58
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joshua Barrett
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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.
 
Paul Clapham
Sheriff
Posts: 24654
58
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Joshua Barrett
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.

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.
 
Paul Clapham
Sheriff
Posts: 24654
58
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!