I'm using Excel COM Interop to automate creating spreadsheets, and sometimes the left side (columns A-H) of the spreadsheet is not visible and I can't scroll to the left. Columns B-E are intentionally hidden and there's a freeze pane at P4. This problem is inconsistent, it happens for only a few people, and doesn't happen every time.
Edit: The shift happens right after applying the freeze panes. Here's the snippet of code that adds the freeze pane.
inout Excel.Worksheet worksheet;
worksheet.Activate();
worksheet.Range[GetEditableArea()].Select();
worksheet.Application.ActiveWindow.FreezePanes = true;
and here's GetEditableArea()
function returns string ColumnRow;
ColumnRow = ColNumToString(COLUMN_OFFSET + 1) + str(ROW_OFFSET + 1);
COLUMN_OFFSET = 15 (the columns after this are dynamic) ROW_OFFSET = 3
I put dialog messages before each statement, and then watched the Excel spreadsheet getting created. The shift to the right is happening right after worksheet.Range[GetEditableArea()].Select();