tags:

views:

30

answers:

5

I have 2 cells that contain data that I need to wrap inside quotes like so:

"cell data 1"[tab]"cell data 2"

When I try and save the file from within excel, only some of the rows are quoted. Can someone help?

+1  A: 

double quotes doesn't help?

" asfm ""embedded"" data "
John Weldon
Hi John,Thanks but I have 13K rows. What I want to do is import all of this data into a database and am trying to use Excel to massage the data. I have the columns seperated but the data just isn't going in. I just pulled a single row of data from my file and manually put quotes around the data and it still isn't going into the db. Would you happen to have any suggestions?
jim
Hi Jim. What DB are you talking about? John's answer is fully correct due to your question above.Putting double quotes inside the quoted area lets Excel printing out one quoting char.="""" results in printing out "
Marco
A: 

Maybe you can use a text editor (like TextPad or Notepad++) for this kind of job. Find replace is more powerful in these editors.

If your data is tab separated, you can easily copy paste data between Excel and Textpad/Notepad++ without losing any formatting.

Rahul
A: 

can you elaborate your issue... not sure what the problem is

Nilesh Deshmukh
A: 

Could you detail "some of the rows"?

Do you escape your other string for quotes ? This is usually the issue when exporting data as text. You have some unwanted chars that broke your cells' value.

Still would like to know a little bit more.

cu

Gautier
A: 

I'm also unclear as to what the required format is, but you could use the Char(9) function to get the ascii tab character.

Assuming your two cells are in columns a and b, if you use the formula

=A2&""""&CHAR(9)&""""&B2

and you save as CSV, you will see the result.

cell data 1,cell data 2,"cell data 1""  ""cell data 2"

You can then do a search and replace on "" to change it to " if that's what you need.