• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Kriztine Mendoza

Senior .NET Developer & Tech Partner for Scalable Software Solutions

  • Home
  • About
  • Work
  • Services
  • Contact Me

Solved: Truncation Error when Importing from MS Excel to SQL Server

August 28, 2017 by kriztine

Issue

I was trying to import an Excel sheet with cells that contain very long strings (more than 256 characters) to SQL Server through the SQL Server Import Data Wizard.

What I have tried to do

Since the cells contain more than 256 characters, I have changed all varchar’s (or nvarchar) size to MAX. However, it did not solve the issue.

The Solution

Aside from changing the size to MAX, I have transferred one of the rows with a cell that has long strings to the first row so SQL Server would know that, indeed, a particular contains a very long string!

I have read somewhere that you can change something in the registry so SQL Server would automatically treat long strings as nvarchar(MAX), but I haven’t tried that yet.

 

Filed Under: SQL Tagged With: SQL Server

Primary Sidebar

Recent Posts

  • The tooltip or Intellisense for methods do not appear!
  • Scrollbar doesn’t show on Safari
  • WebResource.axd File Compression
  • X-Frame-Options header and X-Content-Type-Options = nosniff
  • Solved: Truncation Error when Importing from MS Excel to SQL Server

Categories

  • .Net Development (7)
  • Design (4)
  • How-To's (3)
  • Marketing (1)
  • Project Management (2)
  • Projects (1)
  • SQL (4)
  • System Administration and Configuration (2)
  • Tools (8)

Archives

SERVICES
  • Responsive Web Design
  • Custom Web/Software Development
  • Content Management System
  • API Development and Integration
  • Database Design and Management
  • System Configuration and Administration
QUICK LINKS
  • About
  • Services
  • Dev Notes
  • Resources
  • Contact me
GET IN TOUCH
  • +6349.539.1339
  • contact@kriztine.com
  • kriztine.tech@gmail.com

© 2025 · All Rights Reserved · Kriztine Mendoza

Attributions · Privacy Policy

"Whatever you do, work at it with all your heart, as working for the Lord..." - Colossians 3:23