Exporting into Text Format

V

Ven

I'm exporting a table into text format the problem is the alignment of
decimal points....

Here is an example:

Result should be:

12.00
123.00
1.32
1234.12

When I exported it, it goes like this..

12.00
123.00
1.32
1234.12

Anyone know how to do this?
THANKS!!
 
K

Klatuu

That is because when exporting to a text file, everything is converted to
text and therefore left aligned. There is no way to set justification in
this situation. There is; however, a trick you can use that will make it
look justified. What this expression does is return a string of a specified
width with leading spaces so the numbers appear to be right justified. First
you have to determine the maximum width for the column and use that as the
number in the expression. In the example below, I am using a column width of
12 characters.

Justified: Space(12-Len(format([NumField],"0.00"))) &
Format([NumField],"0.00")
 
V

Ven via AccessMonster.com

Klatuu said:
That is because when exporting to a text file, everything is converted to
text and therefore left aligned. There is no way to set justification in
this situation. There is; however, a trick you can use that will make it
look justified. What this expression does is return a string of a specified
width with leading spaces so the numbers appear to be right justified. First
you have to determine the maximum width for the column and use that as the
number in the expression. In the example below, I am using a column width of
12 characters.

Justified: Space(12-Len(format([NumField],"0.00"))) &
Format([NumField],"0.00")
I'm exporting a table into text format the problem is the alignment of
decimal points....
[quoted text clipped - 17 lines]
Anyone know how to do this?
THANKS!!

Thanks! I've tried before using this code right((" "&[field]),5) as
[alias] it didn't work though..
Those who have no cents just display the whole number which should be decimal
( .00).

Do you know also about why when you export a file into excel format then
transfer the excel file to another computer and when you open it and try to
edit or print it, it shows an error something like this "Not enough resources
to... " The computer's OS is windows98 and have to save the excel as 2003
format. When I checked the comps specs, there's no problem in it. I don't get
it because when I transfer it again to another computer which is also
windows98 it work there, I can even edit or print the excel file. What does
the error mean? Does it have something to do with the computer or the
conversion of excel2007 to 2003 but the file works to another w98 comp? Any
idea with this error?
 
K

Klatuu

This question would be better asked in an Excel newsgroup. Wish I could
help, but I am not that savy when it comes to Excel.
--
Dave Hargis, Microsoft Access MVP


Ven via AccessMonster.com said:
Klatuu said:
That is because when exporting to a text file, everything is converted to
text and therefore left aligned. There is no way to set justification in
this situation. There is; however, a trick you can use that will make it
look justified. What this expression does is return a string of a specified
width with leading spaces so the numbers appear to be right justified. First
you have to determine the maximum width for the column and use that as the
number in the expression. In the example below, I am using a column width of
12 characters.

Justified: Space(12-Len(format([NumField],"0.00"))) &
Format([NumField],"0.00")
I'm exporting a table into text format the problem is the alignment of
decimal points....
[quoted text clipped - 17 lines]
Anyone know how to do this?
THANKS!!

Thanks! I've tried before using this code right((" "&[field]),5) as
[alias] it didn't work though..
Those who have no cents just display the whole number which should be decimal
( .00).

Do you know also about why when you export a file into excel format then
transfer the excel file to another computer and when you open it and try to
edit or print it, it shows an error something like this "Not enough resources
to... " The computer's OS is windows98 and have to save the excel as 2003
format. When I checked the comps specs, there's no problem in it. I don't get
it because when I transfer it again to another computer which is also
windows98 it work there, I can even edit or print the excel file. What does
the error mean? Does it have something to do with the computer or the
conversion of excel2007 to 2003 but the file works to another w98 comp? Any
idea with this error?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top