473,507 Members | 9,962 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

enclosing csv fields in quotes

Hi

I am trying to create a CSV file with some fields in double quotes ("). I am
not having any luck.

This is what I want;

"8684","COSTING","000010001","REG",X4,15.00, ,14,0,14,9,6

I am not sure how to create the double quotes. The ASP is this;

strTemp = rsCAExport.Fields("Employer Number") & "," & _
rsCAExport.Fields("Import Type ID") & "," & _
rsCAExport.Fields("Employee Number") & "," & _
rsCAExport.Fields("Cheque Type") & "," & _
rsCAExport.Fields("Code") & "," & _
rsCAExport.Fields("Value") & "," & _
rsCAExport.Fields("Distribution") & "," & _
rsCAExport.Fields("Rate") & "," & _
rsCAExport.Fields("Premium") & "," & _
rsCAExport.Fields("Day") & "," & _
rsCAExport.Fields("Pay Period") & "," & _
rsCAExport.Fields("Batch ID") & VBCrLf

Can anyone help?

Thanks

Tim Cowan
Jul 19 '05 #1
2 1782
maybe something like this (untested):

strTemp = quoteField(rsCAExport.Fields("Employer Number")) & "," & _
quoteField(rsCAExport.Fields("Import Type ID")) & "," & _
function quoteField(sField)
quoteField="""" & sField & """"
end function

"Tim Cowan" <ti**@peopletogo.com> wrote in message
news:Ov*******************@news20.bellglobal.com.. .
Hi

I am trying to create a CSV file with some fields in double quotes ("). I am
not having any luck.

This is what I want;

"8684","COSTING","000010001","REG",X4,15.00, ,14,0,14,9,6

I am not sure how to create the double quotes. The ASP is this;

strTemp = rsCAExport.Fields("Employer Number") & "," & _
rsCAExport.Fields("Import Type ID") & "," & _
rsCAExport.Fields("Employee Number") & "," & _
rsCAExport.Fields("Cheque Type") & "," & _
rsCAExport.Fields("Code") & "," & _
rsCAExport.Fields("Value") & "," & _
rsCAExport.Fields("Distribution") & "," & _
rsCAExport.Fields("Rate") & "," & _
rsCAExport.Fields("Premium") & "," & _
rsCAExport.Fields("Day") & "," & _
rsCAExport.Fields("Pay Period") & "," & _
rsCAExport.Fields("Batch ID") & VBCrLf

Can anyone help?

Thanks

Tim Cowan

Jul 19 '05 #2
Puzzle 5 Not much different from other solutions by Manohar Kamath
posted 1/12/99
http://www.asp101.com/puzzles/puzzle5_s7.asp

Puzzle 5 "Write delimited data to browser window" by Kirk Lockhart
posted on 12/21/98
Write the data in plain text to the browser window, and the user can
save the results as a plain text file and then import the data into
Excel or whatever application they want.
http://www.asp101.com/puzzles/puzzle5_s1.asp

Creating the Excel File Server Side
http://www.greggriffiths.org/webdev/...erverside.html
Uses FSO to create a .csv file.

http://www.aspmessageboard.com/forum...?M=353414&F=31
&P=1
CSV Summary - What I Found Out

Best regards,
J. Paul Schmidt, Freelance ASP Web Designer
http://www.Bullschmidt.com
ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

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

Similar topics

0
5020
by: Charles Blaquière | last post by:
While noodling around, looking for a good layout for an "events calendar" page, I came upon a problem that has me stymied. Have a look at http://kpuc.org/events/upcoming-2.html . The basic...
1
5375
by: Miguelito Bain | last post by:
hi everybody. i'm trying to find out what you can and can't do with/in calculated fields. any help, pointers, and/or advice would be greatly appreciated. i'm a newbie, but i want to learn, and...
5
10855
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
4
7529
by: Will | last post by:
Hi, I had a DCount within a module on records in a table where CustSuffix = 0. I now need to DCount where CustSuffix = 0 and the type of cost Suffix (Suffix in table) = G. I can't get both...
4
2252
by: Sommerfield | last post by:
I've imported a txt list into Access which has some rows that look like: 0000 0100 CH Saze National Msr 1 M CH 4460b 4750x 4800q 5945b 6030b 6125s 7275b 7290b 9500s 9630q 9675b...
7
1524
by: jmp | last post by:
(I hope this isn't considered too far off-topic.) I work as a developer on a browser product found on handheld devices, and I'm trying to specify behavior for the browser to make it "as...
12
4140
by: rshepard | last post by:
I'm a bit embarrassed to have to ask for help on this, but I'm not finding the solution in the docs I have here. Data are assembled for writing to a database table. A representative tuple looks...
3
4325
by: perryche | last post by:
All, In excel, when you find a field within a spreadsheet is wrong, and every row needs to be changed, you simply change one cell, copy that cell, and select all the rest of the cell, and paste...
10
3032
by: ARC | last post by:
This is mainly a speed question. In this example: I have a QuotesHdr table that has a few memo fields. If these memo fields are used extensively by some users, and if their are a large number of...
0
7221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7109
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
7313
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
7372
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...
1
7029
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
5619
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
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.