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 9201289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:58:13+00:00 2026-06-17T22:58:13+00:00

I have a query that I run in SQL Server using Management Studio. The

  • 0

I have a query that I run in SQL Server using Management Studio. The results are output to the grid that I then copy and paste to Excel sheet that gets saved in .csv format. I’ve never had any problem doing this before but this one particular query includes a column that contains a large chunk of HTML (several thousand char.). If I try to paste the entire query output into excel it can’t handle that column and the sheet is unusable.

I have to paste everything else and then copy each of the rows individually that contain the HTML and double click the destination cell in Excel to enter in “edit mode”. Is there any way around this?

I have tried: Output to text but no matter what I set the maximum column value to in SSMS it truncates the HTML column. I have tried output to file but the only file choice it gives me is Crystal Reports. Is there a way to either put Excel in edit mode globally so that I can paste the entire thing at once, or to tell SSMS (Express Version) to output to a .csv file?

ETA: I’ve tried right clicking on the grid results and saving as .csv but it still truncates the HTML column. Even though I have “Results to Text” option set at 8K chars. and non XML data set to over 64K in the results to grid option.

  • 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-06-17T22:58:14+00:00Added an answer on June 17, 2026 at 10:58 pm

    As @Remy pointed out, have you tried using OPENROWSET:

    insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0', 
    'Excel 8.0;Database=C:\template.xls;', 
    'SELECT * FROM [SheetName$]') 
    select * from myTable
    

    — EDIT

    Make sure you have Ad Hoc Distributed Queries enabled:

    sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'Ad Hoc Distributed Queries', 1;
    GO
    RECONFIGURE;
    GO
    

    Good luck.

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

Sidebar

Related Questions

We have a query that takes 2 seconds to run in Sql Server Management
I am using Sql Server Management studio and I'm running a query with a
I have a stored procedure that executes much faster from Sql Server Management Studio
I have a query that takes 5 seconds to run in SQL Server Managment
I'm using microsoft SQL server management studio 2005 I'm trying to run a job
I have a custom SQL query that I run with this line: @avg_score =
I have a java.sql.ResultSet object containg data from a query that was run. How
I am using in C# MYsql .I have query that works if I run
I have a .cfc on my server that I use to run a query
I have heard that Linq query write once can be run on SQL 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.