473,698 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

loseing (exact) number format while uploading in .csv file in response.write method

17 New Member
Using Response.Write( ) method to export table data in .csv format. In the table one column is of number type and its length is up to 20 digits. When uploading data into .csv format its eleminating digits after 15th digit and placing 0 values till the end. And showing in exponasial formate number.
ex- actual no - 123456789012345 67890
saving as - 123456789012345 00000
Is there any way to formate column or cell using Response.write for .csv file.

Thanks in advance.
Sep 12 '08 #1
4 3232
Plater
7,872 Recognized Expert Expert
I would guess that since that number is so large is gets truncated? Might be implicitly casted as a Double? Make sure you are using a UInt64 to hold the number maybe?
Sep 12 '08 #2
adityakoppolu
17 New Member
Thanks for your response Plater.

I am converting totally into string format. And then writing it into file through Response.Write( ). Actually value which is getting through application is same and correct value. But because of excel(.CSV) default settings value is formating to exponansial format value. i am unable to change .csv settings through inbuilt Response method before writing into it.
Sep 16 '08 #3
Plater
7,872 Recognized Expert Expert
If the problem is with how excel reads the values, I don't think there is anything you can do in code.
Have you resized the width of the columns in excel? I find that when they are narrow, excel converts long numbers into scientific notation.
Sep 16 '08 #4
balabaster
797 Recognized Expert Contributor
If you open the CSV in Notepad, you will likely see that the data stored in the CSV is correct. It is just how Excel is displaying the data that is incorrect. The easiest way around this is to change the formatting of the incorrect columns in Excel itself. If you were to save to Excel's native format instead of CSV, you could save the column formats too. This would alleviate the problem - but then you've got the added overhead in your code of creating a native Excel document and setting the column formats etc.
Sep 16 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
7832
by: Kevin Ollivier | last post by:
Hi all, I've come across a problem that has me stumped, and I thought I'd send a message to the gurus to see if this makes sense to anyone else. =) Basically, I'm trying to upload a series of files via FTP. I'm using ftplib to do it, and for each file I'm using transfercmd("STOR " + myfile) to get the socket, then uploading 4096 bytes at a time and providing status updates via a GUI interface. Finally, I close the socket, set it to...
4
2193
by: M P | last post by:
Can you help me find an asp code that will upload a file from my PC to web server? Mark
0
1249
by: FusionGuy | last post by:
I've created a file uploading handler, implemented as an httpHandler. Each time I attempt to upload a file, or files, my HttpContext.Request.Files property never contains the files that were uploaded. Here's a snippet of my handler code: // *** BEGIN HANDLER CODE *** // public class AutoUpload : IHttpHandler { public void ProcessRequest(HttpContext context) {
2
3951
by: FusionGuy | last post by:
I've created a file uploading handler, implemented as an httpHandler. Each time I attempt to upload a file, or files, my HttpContext.Request.Files property never contains the files that were uploaded. Here's a snippet of my handler code: // *** BEGIN HANDLER CODE *** // public class AutoUpload : IHttpHandler { public void ProcessRequest(HttpContext context) {
1
1415
by: fa_2064 | last post by:
hi every body when i run this code i receive this error! my "wwwroot" folder is shared, but i don't know what it's reason is!!! {"Access to the path \"D:\\Inetpub\\wwwroot\\iranian\\images\\user_imgs\\Untitled-1.jpg\" is denied." } is there a way that the url be relative??? my code is:
1
4412
by: WeCi2i | last post by:
Okay, I have a problem that has been stumping me for weeks. I have tried many different solutions and this is pretty much my last resort. I have seen a lot of good answers give here so I figured I would give it a try. First of all, I am using Visual Studio 2005 to write my program. I am using C# .NET as the language. I am running Windows XP Professional with all service packs and updates applied. Now, I have been trying to write a...
221
367511
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application needs to store entire files, the preferred method is to save the file onto the server’s file-system, and store the physical location of the file in your database. This is generally considered to be the easiest and fastest way to store files. ...
2
2218
by: Bremanand | last post by:
Hi folks, i am working in C# , i have problem while uploading the file to FTP which has size around 4MB. The code which comes after the bold area is not executed.. here am interacting with DB for every succeessful upload. But its working well for the file which has small size around 1MB. Please give me a solution asap... My code is as follows. string ftpServerIP = rowClient.ToString(); string ftpUserID =...
3
2613
by: Bremanand | last post by:
Hi folks, i am working in C# , i have problem while uploading the file to FTP which has size around 4MB. The code which comes after the bold area is not executed.. here am interacting with DB for every succeessful upload. But its working well for the file which has small size around 1MB. Please give me a solution asap... My code is as follows. string ftpServerIP = rowClient.ToString(); string ftpUserID = rowClient.ToString(); ...
0
8673
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
8601
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
9021
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...
1
8892
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
7716
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...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4365
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...
1
3043
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2327
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.