473,750 Members | 2,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading and Writing Excel Spreadsheets Using ADO.NET C#

Hi,

I'm using ADO. NET to update excel from c# code. It works fine with one
exception.
If value for given column can be parsed to number then something (ADO .NET
??) put extra apostrophe sign at the begining. How to avoid it?

Thanks

Shark

Apr 11 '08 #1
1 3624
On Apr 11, 5:16*am, "shark" <m...@poczta.on et.plwrote:
Hi,

I'm using ADO. NET to update excel from c# code. It works fine with one
exception.
If value for given column can be parsed to number then something (ADO .NET
??) put extra apostrophe sign at the begining. How to avoid it?

Thanks

Shark
Hi,

Can you post the code you are using?
Apr 11 '08 #2

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

Similar topics

1
1531
by: Michael White | last post by:
HI All.. I have an asp page that queries a database and displays a report. There is a button on this page that I would like to dump the report into Excel. The code behind the button: var xl = window.open("/reportexport.asp", "_blank"); and a new window is displayed with excel. Now the problem is how do I get the report html into this new window?
1
9234
by: smonczka | last post by:
I have a DTS package that needs to refresh data in 3 separate Excel spreadsheets on a daily basis. The problem is that unless I manually delete the previous day's data, it appends rather than replaces. I can't delete the excel files on a daily basis, as they have to be there for the DTS package to be able to export to Excel. What I want to do is create a VBScript (ActiveX Control) to delete all the rows of data except the first row...
1
9775
by: Hemanth | last post by:
Hello there, Could someone pls give me pointers (or examples) on how to use PHP (installed on a linux) to read & write MS Excel spreadsheets. So far I've been converting a spreadsheet to text (as tab separated values) and processing the text file. I'm wondering if I can avoid this step and process the .xls file directly. I found a thread in this group - related to this topic - but it says, MS excel needs to be installed on target...
11
4054
by: Mr. Smith | last post by:
Hello all, My code can successfully open, write to, format and save several worksheets in a workbook then save it by a given name, close and quit excel. My problem is that if I try and do it again, Excel hangs. OR if I open Excel again (say from a desktop icon) before I close Access, Excel hangs. (this has happened for both 97 & 2000 for me) I of course thought that I mustn't be unloading a variable properly.
3
2585
by: Elliot | last post by:
The program loops through a dataset and creates several spreadsheets based on a change in a particular column. With each new spreadsheet I launch a new instance of excel. After about 100 spreadsheets, a "not enough memory to start Excel" displays. When I checked the Task Manager I had plenty of memory available--I was only using 10% of the memory available. I am setting my objects to nothing and tried using GC.Collect() but it did not...
0
2248
by: Rich Wallace | last post by:
Hello all, Looking for suggestions and tips if possible. I have an application running on a file server that utilizes the FileSystemWatcher to trap when any Excel files are saved by a user. I then need to 'trap' the current file and generate an XML file from the data within the active spreadsheet. I have two issues so far with doing this... Issue 1: Once a file that is being watched is saved, I grab it using the
5
8956
by: Scott M. Lyon | last post by:
I've just discovered a bug in some code I wrote a little while ago, and I need you guys' help to fix it. My program imports data from a standard Excel Spreadsheet (just with specific column headers). I used ODBC in my VB.NET program to read that spreadsheet into a dataset, to make it easy to manipulate. The code I use to read it is as the bottom of this posting.
1
4617
by: Mitch | last post by:
I am using Access to create an Excel spreadsheets with graphs related to rows on the sheet1 to the graph on sheet2. I am using the same data but different subsets of the data to make different spreadsheets for different groups. The spreadsheet formats are the same for each of the different groups. So I am using a loop to requery the data for the different groups and create a new spreadsheet for each group. The three graphs on sheet 2...
0
767
by: DrewYK | last post by:
I have the project that may never end in front of me. I am creating a routine that will take SpreadSheets from Excel and bring them into Access. I am not using any "DoCmd"s because the goal is for the import code to be moved to a stand alone VB app which will use the Access DB as a workspace to process the data from the spreadsheets. Quite honestly, done right this may not even require Access or Excel to be on the users machine. ...
0
910
by: shark | last post by:
Hi, I'm using ADO. NET to update excel from c# code. It works fine with one exception. If value for given column can be parsed to number then something (ADO .NET ??) put extra apostrophe sign at the begining. How to avoid it? Thanks Shark
0
8839
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,...
1
9344
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9257
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
8264
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
6081
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
4716
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
4893
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2226
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.