Email:      Pass:    Pass?
Close Window   
Subscribe for Email Updates!
Excel tips, help, and more!


Free Excel Forum

Add Smart Quotes To A Csv File

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More

Similar Excel Video Tutorials

Helpful Excel Macros

Complete Guide to Printing in Excel Macros - PrintOut Method in Excel
- This free Excel macro illustrates all of the possible parameters and arguments that you can include in the PrintOut Meth
Prevent Saving a Workbook under a Different File Name
- This Excel macro prevents the user from saving an excel file or workbook under a different file name. The file can only
Open any Program from Excel
- This free excel macro allows you to open any program on your computer from excel. You can open a media player, file vie
Output the File Path to and Name of a Workbook in Excel - UDF
- Free Excel UDF (user defined function) that displays the full file path and name of an Excel workbook. This function is
Open a PowerPoint Presentation from Excel
- This free macro for Microsoft Excel allows you to open any PowerPoint presentation from excel. You can change the file

Similar Topics

I am using Excel 2003 and trying to put together a worksheet with stock
prices, using smart tags. The stock prices all update (I'm using MSN Money
Stock Quotes), but not every stock symbol displays a smart tag. The smart
tags are helpful as they carry a link back to news and other info on the

How can I get ALL the stocks to show smart tags? Incidentally, the stocks
I'm talking about are well known stocks like GM, Proctor & Gamble & Ford.

Thanks in advance.

I saved an Excle file containing text into a tab delimeted text file and all
the data is now in quotes. The file will be used as a input file to another
progarm and the quotes will not be accepted. How can the quotes be left off?

I feel like banging my head against the wall. I have about 20000 records
that I export from PHPMyAdmin to CSV, to which I want to make some changes
so I can import them into another MYSQL table which has different columns.
The problem is that once I open that CSV in Excel it gets royally messed up,
due to its cursed "smart" routines.
For example, the fields which are in this format "2005-11-15" get changed to
"2005/11/15" because they are autodetected as dates and Excel knows better
than me what I want, right?
Also, when exporting from PHPMyAdmin, the data is like this


After working with it in Excel it gets turned into this:


As you can see, only some of the fields now have quotes, (why? It's Excel
being smart again and making the CSV inconsistent) which breaks my CSV
import script.
I'm going nuts. I've tried OpenOffice, which does the same thing, unquoting
some of the fields. Tried 602 PC Suite, it crashes when opening the original
CSV, which is about 23 MB, but whatever the cause, I can't try and see if it
works any better.
Tried a tool called DMCSV which is supposed to be a CSV editor, but it locks
up when trying to open the CSV file, because apparently it can't handle the
file's size.
So I'm really stuck. Is there anyway to get Excel to put quotes around all
the fields, so it can generate a consistent CSV.

A Smart Tag is a pop-up menu that allows access to more commands that are relevant to the current task.

1. Select File -> Excel Options
-> Proofing -> AutoCorrect Options -> Smart Tags tab.
2. From Show smart tags as dropdown list, select None.


I have a very big import to do from Excel 2002 to a .txt file. I need
double quotes around all text fields, but I get everything but. Can
someone pleeeese tell me how to do this.

Do I need the format of the fields to be general or text? Do I start
with single quotes, double quotes, no quotes or maybe even two single
quotes? I've tried everything I can think of.

I even tried going through a .csv file, but then I get three double

Thanks a bunch,


This is an annoying problem. I have to import data into a program as a .txt file. The program has a bug and does not recognize quotes that protect values with commas from real quotes within values. So any value with a comma comes in with quotes and any value with quotes goes in with double quotes. They have acknowledged that this is a bug in their import utility and it may or may not get fixed in the next version

So in the meantime, I have to import several files containing information that may or may not have quotes and or commas that would cause "tricky" quotes. Is there a VB script I can run on the .txt file or any other ideas you may have for removing quotes that have soley been put in to preserve values containing commas? Here is an example of my data:

Primary Key Description
100 Man with dog, Mt. Tamalpais in background
101 "Titanic"
102 Originial, "Man with head dress, Inuit"

In the .txt file it appears (as it should)
Primary Key Description
100 "Man with dog, Mt. Tamalpais in background
101 ""Titanic""
102 "Original, ""Man with head dress, Inuit"""

So basically, I want to be able to save this file as a .txt file without the embedded delimited quotes but keep the original quotes originally in the values.

Any help or ideas would be greatly appreciated.


I am trying to open a text CSV file in Excel to edit the file, but require
certain fields to have double quotes around them. When I do this, I get the
message about not all features are supported and when I then look at the
file, the double quotes are gone. Is there a way to keep the double quotes
when making the changes and then saving the file as CSV.


I've got a good one here for you all.

A user of mine goes to a website and downloads a file to his PC (clicks on Save when prompted from the open/save dialog box), and for some reason, when he opens the file, each number in every cell appears with quotes surrounding them. The quotes SHOULD NOT be there.

Funny thing is that when he opens the file from the website (clicks Open from the open/save dialog box) and then saves the file through the usual File > Save As, closes and reopens the file, there are no quotes as it should be.

This one is baffling me . Has anyone else ran into this issue?

Any help would be appreciated.


When Smart Tags are turned on, Excel recognizes specific entries and will add
a smart tag where applicable. For example, if you enter MSFT, Excel will
recognize this as a stock symbol and add the smart tag. My question is how
do I get Excel to recognize an entry as a stock symbol and add the smart tag
if it doesn't do it automatically?

I have a file that was exported to a txt file from one of our systems and brought into excel. I need to get it in a sortable format. Is there a way to write a macro to move the invoice number and store name to the right of each column. Please let me know. Thanks.

Look Like: PERIOD 2009/10/01 TO 2009/10/30 INV: 1234-5678-9 Grocery Sto Smart Shopping One Volume InStore Delivery, LOCAL 1,000 IS 1 Credit, local 6 IS 10 RETURNS, LOCAL 11 IS 0 GOVERNMENT 0 ADDTL Freight 0 IS 12 OutStore Delivery, LOCAL 121 IS 1 CREDITS, LOCAL 2 IS 6 RETURNS, LOCAL 3 IS 9 GOVERNMENT 2 ADDTL Freight 11 IS 0 Need it to look at: PERIOD 2009/10/01 TO 2009/10/30 INV: 1234-5678-9 Grocery Sto Smart Shopping One Volume Grocery Sto Smart Shopping One INV: 1234-5678-9 InStore Grocery Sto Smart Shopping One INV: 1234-5678-10 Delivery, LOCAL 1,000 Grocery Sto Smart Shopping One INV: 1234-5678-11 IS 1 Grocery Sto Smart Shopping One INV: 1234-5678-12 Credit, local 6 Grocery Sto Smart Shopping One INV: 1234-5678-13 IS 10 Grocery Sto Smart Shopping One INV: 1234-5678-14 RETURNS, LOCAL 11 Grocery Sto Smart Shopping One INV: 1234-5678-15 IS 0 Grocery Sto Smart Shopping One INV: 1234-5678-16 GOVERNMENT 0 Grocery Sto Smart Shopping One INV: 1234-5678-17 ADDTL Freight 0 Grocery Sto Smart Shopping One INV: 1234-5678-18 IS 12 Grocery Sto Smart Shopping One INV: 1234-5678-20 OutStore Grocery Sto Smart Shopping One INV: 1234-5678-21 Delivery, LOCAL 121 Grocery Sto Smart Shopping One INV: 1234-5678-22 IS 1 Grocery Sto Smart Shopping One INV: 1234-5678-23 CREDITS, LOCAL 2 Grocery Sto Smart Shopping One INV: 1234-5678-24 IS 6 Grocery Sto Smart Shopping One INV: 1234-5678-25 RETURNS, LOCAL 3 Grocery Sto Smart Shopping One INV: 1234-5678-26 IS 9 Grocery Sto Smart Shopping One INV: 1234-5678-27 GOVERNMENT 2 Grocery Sto Smart Shopping One INV: 1234-5678-28 ADDTL Freight 11 Grocery Sto Smart Shopping One INV: 1234-5678-29 IS 0

I'm exporting a tab delimited file, but I notice that Excel wraps quotes around fields that have a comma, and fields that have quotes.

Is there a way to prevent this and just get the raw data. The reason I'm using a tab delim file is because I want the commas in the fields, but it's much easier to import into my DB if I can prevent this "" wrapping, and just get a raw tab delim file.

Hi there guys
If I have a xpreadsheet how can I save as a csv file with each column enclosed in quotes?? I can save the file as a csv but the fields are not enclosed in double quotes like below.


Hi Everyone. I have a tab-delimited file that I open with Excel, make a few tweaks to, then save as a comma-delimited file. However, the export file has to use quotes as a text qualifier as well, and I can't seem to find an option to add the quotes automatically when saving as a CSV file. Does anyone know how to achieve this. I must admit it has been many years since I have used Lotus 1-2-3, but I seem to remember it being quite easy to do in that program.

Since quotes are used quite commonly as a text qualifier in a delimited file, I find it hard to believe that Excel would not support this feature, but I can't find it if it does.

I don't have to do this that often, but often enough that I would really like to find a solution that doesn't involve me opening the CSV file and manually adding the quotes where necessary.

Any help would be much appreciated.


We are using Excel 2003. When we export a spreadsheet as a text file, using
the "File/Save as" menu item, we don't get quotes around the fields.

Unfortunately, we need them, because our mass mailer won't accept the data
unless the quotes are present.

Where did they go? How do I get them back? TIA, all.

Hello, I'm new to the forum. I have searched Google and this forum as well but it seems I'm either not that smart or no one was able to figure this out. I'm a complete VBA newbie so I apologize in advance. Here is what I'm hoping someone intelligent can help me with, I know this definitely needs to be accomplished with VBA.

I have an external data source importing real time stock quotes and the connection refreshes every one minute. Ok so far pretty easy to follow. What I would like is the most recent quote on top and the previous quotes get pushed down below that one. This should happen after each one minute refresh. Hopefully that was clear. I would like a history of each minute so I can apply some analysis on the minute by minute data. I would also like the data to delete itself after it's say 300 cells old because we don't need a million cells of data to slow the file down. *Just want to note that the data will only update from this site during US market hours (9:30-16:00 EST)

I have attached the Excel 2007 file as an example. It has the data connection already setup with descriptions and examples of what I'm looking to accomplish. I know there are some people looking for the same thing as me so hopefully you could edit my file and re-upload it for anyone to use. Thank you so much to anyone that can help me out.

Ok, so I typed "whats New" int he as a question box for Excel 2003 and it
mentions this Person Names SMart Tag menu thing, but I am unable to locate it
or make it happen. I have gone to Tools->Autocorrect Otpions and Smart tages
Tabe, I have enabled all the correct options in theere according to
microsoft. Then I go to the worksheet, and type a name. NOTHING, no smart
tag at all, dates, smart tag, addresses, smart tag... people... NO SMART TAG.
SO I look closer and it says you have to have emailed this person recentlyt,
so I try some of my outlook contacts that I communicate with regularly,
NOTHING. SO I try to sign into messenger and try osoem of those contacts..
NOTHING. So I set up an exchange server account in outlook and try peoples
names form the echange server... NOTHING. What am I dong wrong here? Can
anyone explain or tutorial me thorugh this featuer? It i MADDENING.... sorry
for all the caps.

I am trying to create a .csv file from an Excel file using VBA and when I use the ActiveWorkbook.SaveAs command, only the first row of text contains " quotes around the text. I have multiple rows that must contain the quotes. I have tried using """", and Chr(34), but then that puts """ (3 quotes) around my text. Is there a different function that I should be attempting to use? I am using concatanation to create a field where I would like the quoted text and am using the ActiveCell.Value command (ActiveCell.Text didn't seem to make any difference).

I am trying to get quotes around a phrase but cannot get the beginning quotes to work. i can get the end quote to work but that's it. Can someone help me out? Here is what I am working with. I need the quotes starting at the BTS and ending at the ",B3,"

=CONCATENATE("set interface ",F3," description BTS_",A3,"_",B3,"")

I have a template pre-defined/created. I am looking for something similar to a Smart Tag (let me call it Smart Button for this help request) to achieve the following things: define/attach this smart button to any cell easily when the button is clicked, a new worksheet is created in the same workbook using this predefined template. Use the value of the cell that the smart button is attached to as the name of the worksheet. I thought about implementing this samrt button using a macro. Then I am not sure how to signal when to run the macro or not. Please help! Thankyou in advance.

I have this file test.txt which has this kind of data. i-e columns with quotes.

When I open it using ms excel and modify a column
e.g "test" to "test-new"

and save it, the quotes disappears.

How do I keep the quotes intact after saving in MS excel file?


I had to have all my Excel 2010 file moved from a destop to a portable and now when I try to put the double quotes into formulas they do not come as " but rather as single quotes but not until I press the double quote and then they only show up as single quotes. Can somebody explain why the double quotes are gone as they are rather important to writing formulas.

Last year I modified a template used for calculating project costs for a government agency. The agency was running Excel 2003 at the time, and the file format was .xlt. Some time ago they migrated over to Exel 2007, and the same template that worked fine under 2003 is now misbehaving by prompting for a "smart card". The smart card is prompted for both in .xlt- and .xlsm formats. We have tested dummy templates in all formats, with and without stored macros, and they all work fine.

So, my question is, what strange properties of the particular template might prompt the request for a smart card?

I have a CSV file that contains data in columns A-Q. Some cells may be blank.

I'm having trouble opening this CSV file because when I re-save it after editing it, Excel removes any quotes that were around the data.

Here is the criteria that the data must be formatted like:

If the value in column A = "H", the following columns need quotes around the cell - A-F, H-I, K-M, P-Q. The values in the rest of the columns do not need quotes.
If the value in column A = "D", the following columns need quotes around the cell - A-D, F, I-O, Q. The values in the rest of the columns do not need quotes. Data is only in columns A-Q.

Can somebody write a macro that will format the data as list above and save?


Fellow Forum Members,
I have a Concatenation problem that is due to using quotes within quotes for labels. The two examples below provide a visual of the problem. The top code EXCEL likes. The bottom code EXCEL does not like because the number 1 is wrapped within quotes which conflicts with the quotes for the Label itself.



So my question to anyone out there is how do I get EXCEL to like the QUOTES around the number "1" ? I need to display the Label with quotes and EXCEL does not like it. Any work around will be greatly appreciated.


OK, I'm at a complete loss on this one.

I need to export a worksheet/range to a text file, that part I'm sure I can figure out, but the problem is I have to export it in the following format:

intitle:"text string"

Notice that the quotes are " and not "", when I try this, even with a straight copy and paste, all I can get is:

"intitle:"""text string"""

Ultimately the contents of the csv/txt file needs to be loaded into google, and extra quotes here and there will completely change the results I get.

Any ideas?