views:

29

answers:

0

I'm generating an Excel document server-side using .NET Interop.Excel and Office 2007. One problem (so far) is that FreezePanes does not work consistently. For some users, Excel automatically hides the first few columns if it thinks the freeze point may not be visible. I've captured several variables trying to debug this, and the critical difference appears to be the Application.UsableWidth value. I've tried several ways to affect the window size, with no effect. Note that Application.Visible is set to False.

Questions:

  1. Does anyone know how to programatically influence the UsableWidth attribute when the Visible attribute is False?
  2. Is there a way to disable the automatic hiding of initial columns if the freeze point may not be visible?