Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Text formatted as "General" in Excel 2002. How do I avoid that?

I have an application that generates a file. I can give any kind of extension
name to this file generated. I have full control on output generated in this
file. Meaning, I can put quotes, single qute, tab, etc anywhere I want.

My objective is to open up this file in Excel. When I do that, some text
like "00010010" ends up becoming 10010. How do I avoid that from happening.
Note that since the file extension is already a ".xls" or a ".csv", Excel
opens it up right away, rather than going through a formatting steps that I
would normally go through for opening up a ".txt" file.

What I have tried so far is
1) "00010010"
2) '00010010'
3) '00010010
None of these produces the desired result. I would appreciate any help
provided. thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default Text formatted as "General" in Excel 2002. How do I avoid that?

Example,, say your numbers are in Column D
In a standard module enter:

Sub Macro1()
' Macro1 Macro
' Macro recorded 8/11/2006 by Jim May
Columns(4).NumberFormat = "00000000"
End Sub

Ans run it!!

"Anant" wrote:

I have an application that generates a file. I can give any kind of extension
name to this file generated. I have full control on output generated in this
file. Meaning, I can put quotes, single qute, tab, etc anywhere I want.

My objective is to open up this file in Excel. When I do that, some text
like "00010010" ends up becoming 10010. How do I avoid that from happening.
Note that since the file extension is already a ".xls" or a ".csv", Excel
opens it up right away, rather than going through a formatting steps that I
would normally go through for opening up a ".txt" file.

What I have tried so far is
1) "00010010"
2) '00010010'
3) '00010010
None of these produces the desired result. I would appreciate any help
provided. thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Text formatted as "General" in Excel 2002. How do I avoid that?

Or, just change the file extension to .txt and use the wizard.

Jim May wrote:
Example,, say your numbers are in Column D
In a standard module enter:

Sub Macro1()
' Macro1 Macro
' Macro recorded 8/11/2006 by Jim May
Columns(4).NumberFormat = "00000000"
End Sub

Ans run it!!

"Anant" wrote:

I have an application that generates a file. I can give any kind of extension
name to this file generated. I have full control on output generated in this
file. Meaning, I can put quotes, single qute, tab, etc anywhere I want.

My objective is to open up this file in Excel. When I do that, some text
like "00010010" ends up becoming 10010. How do I avoid that from happening.
Note that since the file extension is already a ".xls" or a ".csv", Excel
opens it up right away, rather than going through a formatting steps that I
would normally go through for opening up a ".txt" file.

What I have tried so far is
1) "00010010"
2) '00010010'
3) '00010010
None of these produces the desired result. I would appreciate any help
provided. thanks in advance.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Text formatted as "General" in Excel 2002. How do I avoid that

Hello Chris,
Thank you for your post. Yes, ".txt" would be an easy way out. But
unfortunately, I am doing this for few users, to whom, that would be too much
to ask. Note that I am sending the file I generate as an email. So, all they
would want to do at their end is to click on the attachment and be formatted
right in Excel. If the attachment had a ".txt" extension, they would have to
save that file, then open it with excel and ofcourse use the format wizard
and all.

" wrote:

Or, just change the file extension to .txt and use the wizard.

Jim May wrote:
Example,, say your numbers are in Column D
In a standard module enter:

Sub Macro1()
' Macro1 Macro
' Macro recorded 8/11/2006 by Jim May
Columns(4).NumberFormat = "00000000"
End Sub

Ans run it!!

"Anant" wrote:

I have an application that generates a file. I can give any kind of extension
name to this file generated. I have full control on output generated in this
file. Meaning, I can put quotes, single qute, tab, etc anywhere I want.

My objective is to open up this file in Excel. When I do that, some text
like "00010010" ends up becoming 10010. How do I avoid that from happening.
Note that since the file extension is already a ".xls" or a ".csv", Excel
opens it up right away, rather than going through a formatting steps that I
would normally go through for opening up a ".txt" file.

What I have tried so far is
1) "00010010"
2) '00010010'
3) '00010010
None of these produces the desired result. I would appreciate any help
provided. thanks in advance.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Text formatted as "General" in Excel 2002. How do I avoid that

Please note that I would not be doing anything in Excel. The file that I
prepare in a separate application is sent out via email as an attachment. And
all I expect the receiver at the other end to do is to open this attachment
which has ".xls" or ".csv" extension. And hopefully Excel opens it up fine.
Only problem I face is that my text "00010010" ends up becoming a "10010"
when opened up. So right now I am playing around with different way of
putting this text "00010010", for e.g. single quote, double quote, etc. Any
idea to achieve my objective?

"Jim May" wrote:

Example,, say your numbers are in Column D
In a standard module enter:

Sub Macro1()
' Macro1 Macro
' Macro recorded 8/11/2006 by Jim May
Columns(4).NumberFormat = "00000000"
End Sub

Ans run it!!

"Anant" wrote:

I have an application that generates a file. I can give any kind of extension
name to this file generated. I have full control on output generated in this
file. Meaning, I can put quotes, single qute, tab, etc anywhere I want.

My objective is to open up this file in Excel. When I do that, some text
like "00010010" ends up becoming 10010. How do I avoid that from happening.
Note that since the file extension is already a ".xls" or a ".csv", Excel
opens it up right away, rather than going through a formatting steps that I
would normally go through for opening up a ".txt" file.

What I have tried so far is
1) "00010010"
2) '00010010'
3) '00010010
None of these produces the desired result. I would appreciate any help
provided. thanks in advance.



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
Error message when using Excel to open text file orutulsa Excel Discussion (Misc queries) 2 March 14th 06 06:10 PM
Access Excel Linked Text and Number Issues Scott Excel Discussion (Misc queries) 2 October 4th 05 09:24 PM
Excel keeps converting text to date format John T via OfficeKB.com Excel Discussion (Misc queries) 4 September 12th 05 06:48 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
how do I enable "import text file" excel 2002? jw_schmid Excel Discussion (Misc queries) 2 February 9th 05 10:39 PM


All times are GMT +1. The time now is 07:06 PM.

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

About Us

"It's about Microsoft Excel"