troubleshooting Question

Excel VB.Net : How to programatically hide unused columns and rows from worksheet

Avatar of ccravenbartle
ccravenbartle asked on
Microsoft ExcelVisual Basic.NET
10 Comments1 Solution3227 ViewsLast Modified:
I am developing a VB.Net application that generates Excel spreadsheets.  In each spreadsheet, I want  to hide all unused columns and rows so that the user is presented with the minimum area to work with.

For example, one spreadsheet template has columns A-J and rows 1-100.  I want to hide all columns from K to whatever the end column is (which is Excel version dependent) and I want to hide all rows from 101 to the end row (which is also Excel version dependent).

What is the best way of doing this.
VBA Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros