Share via

Issue inserting a column programatically in excel with Office 365 Version 1705 (Build 8201.2102)

Anonymous
2017-06-23T03:56:42+00:00

We have an issue with inserting a column programmatically in c#.net.

In our application say we are using the line below line

Globals.Sheet1.Range["L1", "L1"].EntireColumn.Insert(Microsoft.Office.Interop.Excel.XlInsertShiftDirection.xlShiftToRight, System.Type.Missing);

The expected behavior of this statement is to insert a new column at Column 'L' . This is working as expected with Office 2016, Office 2013, etc. And also it was working as expected with Office 365 till the recent updates to Office 365 have installed last week. But now post updates to Office 365 this statement is inserting multiple columns (around 30 new columns). But it is working fine with other office products like 2016,2013 etc.

So can you please let us know if it is a bug in the recent update to Office 365 or are we missing anything over here. Can you please help us.

Thanks,

Subhash

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2017-06-30T09:20:27+00:00

    We also have problems with our VBA-application since version 1705 (Build 8201.2102).

    I've done some reading of the added features in this version. Microsoft introduced a feature called "Keep the copy". This means that something you've copied before, remains on your clipboard, which it didn't use to do.

    So you have to clear the clipboard (you can use "Application.CutCopyMode = False" to do this) before inserting. Because when you insert a row or column and you still have data at the clipboard it will also insert this data when inserting a row or column. This might show random data when you insert. 

    Certainly application with VBA will need some debugging if it stays this way. But reading into different forums it seems to be an issue with multiple people. Even people not using VBA are having a hard time with this "Keep the copy" feature. So let's hope Microsoft will do something about it.

    Hopefully this was some useful information.

    Kind regards

    Koen Bauwens

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-06-25T04:35:08+00:00

    I have the same problem in Excel using Office 365 professional.  Macros to insert columns and rows which were working last week no longer work.  They might sometimes work but mostly seem to cut and paste information seemingly randomly on the same worksheet.  Sometimes rows will be inserted as columns.  I have worked around the issue by copying and pasting the information to mimic the insertion of a column.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2017-06-24T13:53:56+00:00

    Yes i have the exact same bug since 8201.2102 release.

    Was this answer helpful?

    0 comments No comments