Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default csv file truncating zero values

this
000999
isn't a number. It's text
when you open a CSV, clever ol' Excel will check the text, recognise it as a
number, and thus changes the type for you, whether you want it to or not.
If you open the CSV in Notepad, you'll see it saved as 000999
So you need to format the cell or column/row as text.
Alternative would be to read in the values from the text file and place them
into a workshheet as text.


"JP" wrote:

When I open a csv file and change contents on the first row via excel,
numbers such as 000999 are saved as 999. I need to change column headings
on the first row of my csv file and save it while preserving the number
formatting below it. Can this be accomplished using the Write or Print
statement via vba? At present, I am opening it and saving it with Excel.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Truncating a VIN lputnam Excel Discussion (Misc queries) 3 November 11th 09 05:28 PM
Truncating values of each sale in the range fbagirov Excel Programming 1 July 13th 07 09:52 PM
truncating series Michael Charts and Charting in Excel 0 May 31st 06 11:41 AM
Exported File truncating cell data after 255 characters Sue Rizzo Excel Discussion (Misc queries) 2 March 17th 05 08:47 PM
Copy values from file A, Find/Replace these values in File B shockley Excel Programming 1 September 22nd 03 12:32 AM


All times are GMT +1. The time now is 05:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"