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!

Excel97:Exporting from Excel to an Ascii File?

Status
Not open for further replies.

sherree

Technical User
Apr 27, 2000
16
US
Hi,<br><br>I need help exporting an Excel multiple spreadsheet to an Ascii File.&nbsp;&nbsp;Any suggestions?<br><br>Also, I am importing an excel spreadsheet<br>into Access and I am getting import errors;<br>Type Conversion Errors (#num!). I change all fields to text.&nbsp;&nbsp;And I am still getting errors.<br><br>Sample data:<br>v1234<br>234.0<br>234.00<br>*v1234<br>411.1<br><br>I would greatly appreciate any suggestions.<br><br>Thanks
 
What is the asterisk for? In Access, it means any character--I don't think it likes it! You'll need to pull this character out, I think. <p> <br><a href=mailto: dreamboat@nni.com> dreamboat@nni.com</a><br><a href= </a><br>
 
Dreamboat is correct about the asterick, Access will have issues importing that record (or that field of that record).<br><br>as for exporting an Excel file to Ascii, i know that you can only export 1 worksheet of a spreadsheet at a time when exporting to a .txt file.<br><br>are you jsut using the Save As function, or are you trying to do it through code? <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Hi Brian,<br><br>&nbsp;Congrats! Thanks for your help last week.&nbsp;&nbsp;I am trying to convert Excel into an Ascii File using code.&nbsp;&nbsp;I figured out the type conversion issues.&nbsp;&nbsp;I set all columns in Excel<br>to General format and all data types in Access to text.&nbsp;&nbsp;Do you remeber the question I<br>ask last week about importing multiple Excel worksheets into an Access table using<br>VBA code only?&nbsp;&nbsp;You, replied that to use the range, but was not confident.&nbsp;&nbsp;I tried, and it does not work, do you have any other suggestions?<br><br>DoCmd.TransferSpreadsheet acImport, 8, &quot;multisheets&quot;, MyValue, True, &quot;A1:J200&quot;<br><br>Thanks
 
there are only two things i can think of.<br><br>1.go through the trouble of putting each worksheet in a seperate spreadsheet, and then just repeating the code and replacing the name of the spreadsheet in each instance.<br><br>or<br><br>2. (and i don't know for sure if this is possible), Find a way to designate which worksheet within a spreadsheet to get the data range from.&nbsp;&nbsp;where you have &quot;A1:J200&quot; put something like &quot;Sheet1!A1:J200&quot;&nbsp;&nbsp;you'd then have to repeat the code again, with everything being the same except for the range - this may work, but i have yet to try it.&nbsp;&nbsp;let me know if it does though.&nbsp;&nbsp; <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top