473,789 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Single Quote Problem in Excel to Export

Hi,

We have to export our data in sql server table to any excel sheet. We have a
template to export, using oledb we are inserting rows to this template and
generating the excel output.

The problem here is we are getting a single quote extra in front of each
cell. can anyone help us in clearing this kind of an issue.

we tried sending some static strings to some columns on for taking from sql
server eventhen we are getting the same
Its Urgent, Please reply ASAP,
Prasad Dannani
Nov 19 '05 #1
4 2908
we'd need to see the ASP.NET (VB?) code most likely...

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Prasad Dannani" wrote:
Hi,

We have to export our data in sql server table to any excel sheet. We have a
template to export, using oledb we are inserting rows to this template and
generating the excel output.

The problem here is we are getting a single quote extra in front of each
cell. can anyone help us in clearing this kind of an issue.

we tried sending some static strings to some columns on for taking from sql
server eventhen we are getting the same
Its Urgent, Please reply ASAP,
Prasad Dannani

Nov 19 '05 #2
Its C# Code. copy template to some folder and then read it by using oledb
with parameters nothing else.

"Curt_C [MVP]" <software_at_da rkfalz.com> wrote in message
news:77******** *************** ***********@mic rosoft.com...
we'd need to see the ASP.NET (VB?) code most likely...

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Prasad Dannani" wrote:
Hi,

We have to export our data in sql server table to any excel sheet. We have a template to export, using oledb we are inserting rows to this template and generating the excel output.

The problem here is we are getting a single quote extra in front of each
cell. can anyone help us in clearing this kind of an issue.

we tried sending some static strings to some columns on for taking from sql server eventhen we are getting the same
Its Urgent, Please reply ASAP,
Prasad Dannani

Nov 19 '05 #3
We tried all possible combinations and finally able to find that the problem
is there in the excel template i specified the cells format type to text
then it worked properly.
"Prasad Dannani" <pr****@pennywi se.com> wrote in message
news:e%******** ********@TK2MSF TNGP09.phx.gbl. ..
Its C# Code. copy template to some folder and then read it by using oledb
with parameters nothing else.

"Curt_C [MVP]" <software_at_da rkfalz.com> wrote in message
news:77******** *************** ***********@mic rosoft.com...
we'd need to see the ASP.NET (VB?) code most likely...

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Prasad Dannani" wrote:
Hi,

We have to export our data in sql server table to any excel sheet. We have a template to export, using oledb we are inserting rows to this template and generating the excel output.

The problem here is we are getting a single quote extra in front of each cell. can anyone help us in clearing this kind of an issue.

we tried sending some static strings to some columns on for taking
from
sql server eventhen we are getting the same
Its Urgent, Please reply ASAP,
Prasad Dannani


Nov 19 '05 #4
On Wed, 26 Oct 2005 23:02:45 +0530, "Prasad Dannani" <pr****@pennywi se.com> wrote:

¤ Hi,
¤
¤ We have to export our data in sql server table to any excel sheet. We have a
¤ template to export, using oledb we are inserting rows to this template and
¤ generating the excel output.
¤
¤ The problem here is we are getting a single quote extra in front of each
¤ cell. can anyone help us in clearing this kind of an issue.
¤
¤ we tried sending some static strings to some columns on for taking from sql
¤ server eventhen we are getting the same
¤

This is normal behavior from the Excel ISAM driver when it has to determine the data type of the
source. As you've determined, it isn't an issue if the columns in the destination Excel Worksheet
are defined prior to the export.
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5036
by: Matt | last post by:
I have an ASP page that calls ASP routines that I created that execute a database query and return the results to a recordset. I then iterate through the recordset and display the data in a table. Before I iterate through the recordset I instruct the browser that the content type is Excel using the following line: (Response.ContentType = "application/vnd.ms-excel") This works fine with Excel 2003 but with older versions (I tested Excel...
1
3410
by: apgoodb | last post by:
I have a database that I built some functionality to export a query to excel and then do some formatting. After reading a lot of comments it seems I need to use "late binding", because some of the users use 2000 while the others use 2002. This worked using early binding, but after changing the code to what I thought I needed I have a few errors. Here is the code: Dim xlbook as object Set xlBook = GetObject(, "Excel.Application")...
5
3792
by: Maria L. | last post by:
Hi, I need to export the content of a DataGrid (in Windows application in C#), into an Excel spreadsheet. Anyone knows how to do this? Any code snippets would help! thanks a lot, Maria
2
3999
by: Siu | last post by:
Hi, I use the following code to export and import a file Excel from resp. into a Web page with the following code: //EXPORT Response.Clear(); Response.Buffer = true; Response.ContentType = "application/vnd.ms-excel"; Response.Charset = ""; this.EnableViewState = false;
4
8717
by: paul.chae | last post by:
I have a table in Access with about 3000 records. There are ~60 unique values in the ID field for the 3000 records. What I would like to do is automatically generate multiple Excel worksheets within a single workbook with these records. I would end up with around 500 worksheets, 1 for each unique ID value. I was thinking this could be done if I have an exported flag column in the table, and I search for the max (or min) on the ID...
13
13244
by: Hemant Sipahimalani | last post by:
The following piece of code is being used to export HTML to excel. HttpContext.Current.Response.ContentType = "application/vnd.ms-excel" HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=ABC.xls") HttpContext.Current.Response.Write(strHTML) HttpContext.Current.Response.End() However when the user tries to save it the Default File Type is Web Page(*.htm; *.html)
3
2444
by: Eddy | last post by:
I would like to export the output of 2 queries to excel namely: 1. QryProrationbyWBS_1 2. QryProrationbyWBS_2 However I want to do this using the same spreadsheet say sheet1 and sheet2 or better still with sheet name "ProrationWBS1" and "ProrationWBS2", how do I do this with acOutputQuery I have the following 2 commands attached to a command button:
1
10507
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am trying to export to Excel using a command in an Access Form. RowID strFY AccountID CostElementWBS 1 2008 1 7 2 2008 1 7 I want to...
2
6423
hemantbasva
by: hemantbasva | last post by:
Note We need to have a template on server for generating report in multiple sheet as we do not had msoffice on server moreover this require a batch job to delete excel file created by the method.... it creates 6 sheets # region Namespaces using System;
0
9657
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9502
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10189
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9974
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9010
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5412
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5544
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3688
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.