Solved

sql server and excel

Posted on 2014-12-15
5
179 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:
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 65

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tags from access to excel 3 28
macro for closing opened workbook 6 20
Filling Blank Cells 14 19
Excel 2010 - Comparison of texts in a cell 14 37
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

920 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

12 Experts available now in Live!

Get 1:1 Help Now