Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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
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
export to excel option - problem [email protected] Excel Discussion (Misc queries) 1 July 25th 07 07:20 AM
How to export excel file in dbf format Andrew Excel Discussion (Misc queries) 1 December 19th 06 09:59 AM
Excel default number format problem Jason Excel Discussion (Misc queries) 9 July 24th 06 09:21 PM
excel format cells/Number/Category: Number problem Matts Excel Discussion (Misc queries) 5 December 9th 04 09:47 PM
Excel VBA/macro problem; Export to csv [email protected] Excel Programming 1 June 29th 04 07:22 AM


All times are GMT +1. The time now is 10:36 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"