473,405 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Creating tab delimited file

I'm using the Write # statement to create a csv export file from Access 2K

Some of the data has embedded quotes in it and it doesn't import into
QuickBooks correctly.

An inventory part with a name of 1/4" Pipe gets truncated to 1/4
with csv

Can I create a tab delimited file with Aceess and include the quote mark.

Nov 13 '05 #1
5 6477
you could loop through all the records and then loop through the fields
in the recordset... something like:

do until rst.EOF
for intCounter=0 to rst.fields.count-1
if intCounter=0 then
strLine= rst.Fields(intCounter)
else
strLine = strLine & vbtab & rst.fields(intCounter)
end if
next intCounter
'---write your string to your text file
write #1 strLine
rst.MoveNext
loop

you could grab the code Albert Kallal wrote and do the same thing. He
wrote code that basically does this... dig around here for his
website...

Nov 13 '05 #2
"Karl Irvin" wrote
I'm using the Write # statement to
create a csv export file from Access 2K
Some of the data has embedded quotes
in it and it doesn't import into
QuickBooks correctly.

An inventory part with a name of
1/4" Pipe gets truncated to 1/4
with csv

Can I create a tab delimited file with
Aceess and include the quote mark.


Yes, but whether that would import would depend on QuickBooks. An easier
approach would be to double the included quote marks -- that is a convention
_most_ software uses in such situations.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #3
Thanks but the problem is the Write # statement which logically looks at an
embedded quote in a field as the end of the field. I'm looking for an
alternative that will allow me to embed the quote. I think a tab delimited
file may be the answer but I don't know for sure and I don't know how to
create one on using Access.

<pi********@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
you could loop through all the records and then loop through the fields
in the recordset... something like:

do until rst.EOF
for intCounter=0 to rst.fields.count-1
if intCounter=0 then
strLine= rst.Fields(intCounter)
else
strLine = strLine & vbtab & rst.fields(intCounter)
end if
next intCounter
'---write your string to your text file
write #1 strLine
rst.MoveNext
loop

you could grab the code Albert Kallal wrote and do the same thing. He
wrote code that basically does this... dig around here for his
website...

Nov 13 '05 #4
Use the Print statement instead of Write.

Nov 13 '05 #5
Larry Linson wrote:
> Aceess and include the quote mark.


Yes, but whether that would import would depend on QuickBooks. An easier
approach would be to double the included quote marks -- that is a convention
_most_ software uses in such situations.

Larry Linson
Microsoft Access MVP


I have used Access to create tab-delimited files for importation into
QuickBooks. Quotes in fields come in no-problemo and tab-delimited is
very easy to do with the Print command. Tab-delimited format is at
least as ubiquitous as doubling quote marks especially in older
software. So if what Larry said doesn't work for you I recommend
creating a tab-delimited file.

James A. Fortune

Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: monte | last post by:
Hello, I need to parse a tilde delimited file and output it to a tabbed delimited file. Example file example.txt data1~data2~data3~data4 data5~data6~data7~data8 I need to extract data2,...
9
by: Maziar Aflatoun | last post by:
Hi everyone, I like to export some data from the database and allow my users to store this file to their harddrive as a .txt file. Does anyone know how I would go about doing that? (without...
2
by: Astra | last post by:
Hi All Creating an rss.xml file dynamically via ASP/ADO/DB, but find errors in the file. Don't think it's an ASP prob to be honest. Think its more to do with the fact that the ampersands are...
1
by: 2airisdevin3 | last post by:
I am using MS Access 2000 & have a table in which I want to convert the data into a quote comma delimited .txt file. ex. "John", "Doe", "student", ... Any ideas on how to do this? Any help is...
6
by: =?Utf-8?B?UmljaA==?= | last post by:
'--this code works but only reads text into one column when contains multiple cols Dim ds1x As New DataSet Dim ConStr As String = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data...
5
by: RyanL | last post by:
I'm a newbie! I have a non-delimited data file that I'd like to convert to delimited. Example... Line in non-delimited file: 0139725635999992000010100534+42050-102800FM-15+1198KAIA Should...
0
by: kirknew2SQL | last post by:
I have AdventureWorks installed. I am using SQL Server 2005. I need to import some large tab delimited text files into SQL. From the research i did I thought that using BCO would be the best...
5
by: Jetus | last post by:
I have a comma delimited file that is separated by comma's, and then sometimes by "," c:\temp\05-06-08\Sale1,659 CECIL,"659 CECIL,40211", 1,659,CECIL,AVENUE,LOUISVILLE,40211,"$65,276.78 "...
20
by: cowboyrocks2009 | last post by:
Hi, I need help to automate my code to take data from input file. Also I need to create it as a function so that I can pass it to some other program. I am new to Java so having a bit limitation to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.