Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
here is a snippet of my code, from research i did on this problem. basically, if excel sees/displays it in a certain way (as in it drops seconds in the date time, for instance), thats how it converts it. thus, you have to custom-set the format of the cell/column
'Have to update dateformat in column H because conversion to csv will drop seconds 'if excel doesnt see complete format 'find last row to apply number format to Dim iLastRow iLastRow = Mid(Range("H65536").End(xlUp).Address(0, 0), 2) Range("H6").Select Range(Selection, Selection.End(xlDown)).Select Range("H6:H" & iLastRow).Select Range(Selection, Selection.End(xlDown)).Select Selection.NumberFormat = "m/d/yyyy hh:mm:ss" -hth On Monday, September 13, 2010 2:22 PM Sheldon Potolsky wrote: My VBA code saves a spreadsheet as a .csv (... FileFormat:=xlCSV). The problem? The one numeric field, an eleven digit number, converts to exponential form, which I do not want. Any way to do what I am trying to accomplish? Thanks, Sheldon On Monday, September 13, 2010 3:41 PM Mike S wrote: On 9/13/2010 11:22 AM, Sheldon Potolsky wrote: I do not know if this will help or not, using Excel 2000 when I format the cells in a column containing numbers with 11 decimal points as text and save the sheet as csv, the numbers are saved with all of the decimal points, I can see that by opening the csv file with a text editor. But when I open the csv file in Excel, only 9 of the decimal places are displayed. I could not find a setting to restore displaying all 11 of them anywhere, although one probably exists. http://www.eggheadcafe.com/software/...-csv-file.aspx |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel file not saving properly | Excel Discussion (Misc queries) | |||
Excel file not saving properly | Excel Discussion (Misc queries) | |||
How do I shorten a 17 digit field to a 6 digit field? | Excel Programming | |||
how to tell excel to read numeric field as character fr a csv file | Excel Discussion (Misc queries) | |||
Excel changes file name to numeric name when saving --HELP | Excel Discussion (Misc queries) |