Solved

sql server and excel

Posted on 2014-12-15
5
203 Views
Last Modified: 2014-12-16
Hi,

Using excel i connect sql server and then downloaded records in to the excel 2010, its working fine.
But after i uploaded to web site im getting following code, in the begining of each paragraph
_x000D_

I created view and and RTRIM(LTRIM([Fieldname]))
But still getting same code,
Any idea how to remove that code appriciate.thx
0
Comment
Question by:ukerandi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 18

Accepted Solution

by:
Simon earned 500 total points
ID: 40501741
Try
replace(replace(replace(RTRIM(LTRIM([Fieldname])),char(10,''),char(13),''),char(9),'')

That will get rid of linefeeds, carriage returns, and tab chars in your string.
0
 
LVL 26

Expert Comment

by:Nick67
ID: 40501745
The code represents a line break, but is being lost in translation.
I take it there are carriage returns in the text that is in each cell?
Excel is hiding that character from you.
Perhaps you can view the file as a CSV or some other format that will permit you to do a find and replace.
0
 
LVL 18

Expert Comment

by:Simon
ID: 40501747
To clarify my earlier post. The TSQL statement I suggested was for use in the Excel connection properties (if you're using a SQL statement to get the SQL Server data) or to modify the column definition of the SQL server view you are accessing.
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 40501792
<Wild shot in the dark>

In Excel check your connection string into SQL Server, specifically if there's a row delimeter / column delimeter with that value in there, and strip it out.   SSIS has the same issue.

If you need help getting to the connection string, follow this article about halfway down for pictures.
0
 
LVL 10

Author Closing Comment

by:ukerandi
ID: 40503660
spot on great.thx
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question