Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6584211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:30:30+00:00 2026-05-25T16:30:30+00:00

We get an excel worksheet from a customer and there is a data discrepancy

  • 0

We get an excel worksheet from a customer and there is a data discrepancy with one of the col. the item description they send. We want to programmatically open the document lookup the table using item column, and then write a new column with the item description from the table (on SQLSever) that part of getting the data is fine but how to create such a new column is where I am stumped. writing in asp.net but open to however it can be done

I am getting this error when trying to insert a column:

To prevent possible loss of data, Excel cannot shift nonblank cells
off of the worksheet. Select another location in which to insert new
cells, or delete data from the end of your worksheet.

If you do not have data in cells that can be shifted off of the
worksheet, you can reset which cells Excel considers nonblank. To do
this, press CTRL+End to locate the last nonblank cell on the
worksheet. Delete this cell and all cells between it and the last row
and column of your data then save.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:30:30+00:00Added an answer on May 25, 2026 at 4:30 pm

    This problem is not linked to your code, it happens when you have data on the last column (and so Excel do not want you to loose it).

    Yet, the trick is Excel considers that any style is the same as data. So, if you have ever defined a style on the whole row, inserting a column may cause this error.

    Let me give an example to explain it more:

    1. Create a new Excel workbook
    2. Select the whole first row
    3. Paint it in Yellow (or whatever color)
    4. Select cells from A1 to E1
    5. Paint them in white
    6. Try to insert a new column before B
    7. You get the error because Excel does consider that you wanted to define a specific style to the last cell so you would loose this information if you inserted a new column

    Have a look at your file to solve this issue (IMHO, defining style on a whole row is a bad practice because it could cause this kind of error).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to get data from an Excel worksheet in an SQL-like mode. Meaning,
How do you get spreadsheet data in Excel to recalculate itself from within VBA,
I am trying to get data from Excel File to DataTable. Here's my code-snippet
I'm trying to export data from a web app into excel, but there is
I'm trying to filter data from one workbook to another obne, but I get
I've got a project where I'm reading data from an Excel worksheet and saving
I'm using Automation to get_Text from an Excel worksheet. I do this because I
I often have data in Excel or text that I need to get into
I'd like to copy (or move) a worksheet from one workbook to another workbook
I have a need to copy a worksheet from one workbook into another and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.