Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA export excel to .txt, number format problem
I saved as a tab delimited text file and got this in my text file:
..16520E+03 .16520E+03 .16520E+03 ..16520E+03 .16520E+03 .16520E+03 I saved as comma delimited and got this: ..16520E+03,.16520E+03,.16520E+03 ..16520E+03,.16520E+03,.16520E+03 I used a custom number format of: ..00000E+00 for each cell. When you're checking your output, don't import it back into excel. Check it in Notepad (or your favorite text editor.) Reimporting it into excel could be the cause of your heartache. ehflam wrote: Hi. I want to export some data from an Excel file to a text file using macros. I can do the exporting no problem, but the numbers aren't showing as the format a wanted (I need them to be in .00000E+00 so that my other program can read it)(e.g 165.2 = .16520E+03). Right now, I have to change every cell to text, and then switch them back to numbers again after writing to the text file because I don't want to mess up the original file, which makes it extremely slow. Are there any ways to do this without writing to the original excel file at all? Thanks! -- ehflam ------------------------------------------------------------------------ ehflam's Profile: http://www.excelforum.com/member.php...o&userid=16779 View this thread: http://www.excelforum.com/showthread...hreadid=319778 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
export to excel option - problem | Excel Discussion (Misc queries) | |||
How to export excel file in dbf format | Excel Discussion (Misc queries) | |||
Excel default number format problem | Excel Discussion (Misc queries) | |||
excel format cells/Number/Category: Number problem | Excel Discussion (Misc queries) | |||
Excel VBA/macro problem; Export to csv | Excel Programming |