Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sql server and excel

Posted on 2014-12-15
5
Medium Priority
?
214 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

722 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