Solved

sql server and excel

Posted on 2014-12-15
5
173 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
5 Comments
 
LVL 18

Accepted Solution

by:
SimonAdept earned 500 total points
Comment Utility
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
Comment Utility
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:SimonAdept
Comment Utility
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 65

Expert Comment

by:Jim Horn
Comment Utility
<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
Comment Utility
spot on great.thx
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now