ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening text file in excel to maintain as "text" (https://www.excelbanter.com/excel-programming/302874-opening-text-file-excel-maintain-text.html)

Eric[_6_]

Opening text file in excel to maintain as "text"
 
Hi There,

I am writing a macro on how to open a text file in excel
in such as way that my file maintain a "number" text as a
text. Please see below for an example:

I want to open this in column as a text NOT a number.

Code IDNO Region
0001 12345 N1234
0002 35353 C3535
..
..
so on.

How do I do that?

Thanks in advance for your help.
Eric


keepITcool

Opening text file in excel to maintain as "text"
 
in step3 of the text to column wizard,
define the column as text, not general


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Eric" wrote:

Hi There,

I am writing a macro on how to open a text file in excel
in such as way that my file maintain a "number" text as a
text. Please see below for an example:

I want to open this in column as a text NOT a number.

Code IDNO Region
0001 12345 N1234
0002 35353 C3535
.
.
so on.

How do I do that?

Thanks in advance for your help.
Eric




Eric[_6_]

Opening text file in excel to maintain as "text"
 
KeepITcool,

I am not doing it in "manual" wizard I am doing this
in "macro" so, what is the command in macro that will
maintain the text column as a text when I open it in excel?

-----Original Message-----
in step3 of the text to column wizard,
define the column as text, not general


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Eric" wrote:

Hi There,

I am writing a macro on how to open a text file in

excel
in such as way that my file maintain a "number" text as

a
text. Please see below for an example:

I want to open this in column as a text NOT a number.

Code IDNO Region
0001 12345 N1234
0002 35353 C3535
.
.
so on.

How do I do that?

Thanks in advance for your help.
Eric



.


keepITcool

Opening text file in excel to maintain as "text"
 
Eric,

the syntax depends on the number of columns etc
and may be a bit awkward as it requires an array..

try to use macrorecorder and see it you can edit the recorded code.
if you can't fix it.. plse post back with recorded code.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Eric" wrote:

KeepITcool,

I am not doing it in "manual" wizard I am doing this
in "macro" so, what is the command in macro that will
maintain the text column as a text when I open it in excel?

-----Original Message-----
in step3 of the text to column wizard, define the column as text, not
general


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Eric" wrote:

Hi There,

I am writing a macro on how to open a text file in excel in such

as
way that my file maintain a "number" text as a text. Please see
below for an example:

I want to open this in column as a text NOT a number.

Code IDNO Region
0001 12345 N1234
0002 35353 C3535 .
.
so on.

How do I do that?

Thanks in advance for your help.
Eric



.





All times are GMT +1. The time now is 04:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com