• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Apache POI - How to hide Scroll Bars?

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic