Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

export data

Status
Not open for further replies.

AccUser

MIS
May 11, 2000
96
US
I need to export a table's information. My problem is that when I export numbers (ex. -4.5 and 1045) as a fixed-width, the resulting text file would look like:<br><br>-4.5<br>1045<br><br>I need file to look like:<br><br>000004500-<br>001045000<br><br>Can anyone assist?<br><br>Thank you in advance.
 
ther is a way to format a cell in microsoft excel if that is what you are exporting to I am not sure about the details of how it works but you could try that area. but that will have to be done after you export. <p>Walt III<br><a href=mailto:SAElukewl@netscape.net>SAElukewl@netscape.net</a><br><a href=
 
This wouldn't do because the file that I am exporting is too large for Excel. Excel has a row limitation of 65,000-/+ rows. The file that I am exporting is over 210,000 records/rows.
 
The format doesn't neccesarily solve any thing because it is just a way to view information it doesn't actually store data like it shows it. I have a number in one of my tables that is 8 digits long and alot of the time it has two preceding 0's but when I ask to see what the value of some record is if it has the preceding zero's it just gives me a the number without the leading zero's. You might try to change the number's to string values and try to get the leading zero's in that way.<br> <p>Walt III<br><a href=mailto:SAElukewl@netscape.net>SAElukewl@netscape.net</a><br><a href=
 
This seemed to work well:<br><br>=Left(Format([COMMISIONAMT],&quot;000000.000&quot;),6) & Right(Format([COMMISIONAMT],&quot;000000.000&quot;),3) & IIf([COMMISIONAMT]&lt;0,&quot;-&quot;,&quot;&quot;)<br><br>HTH,<br><br>Drew
 
Dang, forgot the abs in the formula...<br><br>Left(Format(Abs([COMMISIONAMT]),&quot;000000.000&quot;),6) & Right(Format(Abs([COMMISIONAMT]),&quot;000000.000&quot;),3) & IIf([COMMISIONAMT]&lt;0,&quot;-&quot;,&quot;&quot;)<br><br>I tried this in a make table query, and the results were <br><br>REF_NO test<br>20486BA 000012000<br>20626BA 000012000<br>21105BA 000012000<br>21564BC 000012000<br>21588B 000012000<br>22763BA 000012000<br><br>
 
sorry i didn't get back to you earlier, but<br><br>thanks drew!<br><br><br>Will try and get back to you.<br>
 
it worked great! I even created a TransferText macro to export the file automatically on demand.<br><br>thanks again!<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top