Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old October 26th 09, 12:19 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Oct 2009
Posts: 1
Default How to stop Excel adding quotation marks when copying to notepad?

I'm just interested in stopping Excel adding quotation marks around text
pasted from copied cells into notepad without having to go into notepad and
do endless 'find and replace's afterwards.

Formatting the cells as text makes no difference so why is Excel adding the
quotes in only around cells containing IP addresses? (And putting a tab after
the first quote marks!)





  #2   Report Post  
Old October 26th 09, 12:44 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 35,218
Default How to stop Excel adding quotation marks when copying to notepad?

I think it depends on what's in your cells.

You could take a macro approach.

Saved from a previous post:

I used the PutInClipboard routine that Chip Pearson has:
http://www.cpearson.com/excel/clipboard.htm

With this sub:
Option Explicit
Sub testme()

Dim MyDataObj As DataObject
Set MyDataObj = New DataObject

MyDataObj.SetText ActiveCell.Text
MyDataObj.PutInClipboard

End Sub

And then pasted (manually) into NotePad. No double quotes were inserted. But I
did see a little square where the alt-enter was.

Chip has instructions that you have to follow (including the tools|references
with "Microsoft Forms 2.0 object library") on that sheet.

=========

If you wanted to copy multiple cells, this may help you:

Option Explicit
Sub testme()

Dim MyDataObj As DataObject
Dim myCell As Range
Dim myRow As Range
Dim myRng As Range
Dim myRowStr As String
Dim myStr As String

Set MyDataObj = New DataObject

Set myRng = Selection.Areas(1)

myStr = ""
For Each myRow In myRng.Rows
myRowStr = ""
For Each myCell In myRow.Cells
myRowStr = myRowStr & vbTab & myCell.Text
Next myCell
myRowStr = Mid(myRowStr, Len(vbTab) + 1) 'get rid of leading vbtab
myStr = myStr & vbCrLf & myRowStr
Next myRow
myStr = Mid(myStr, Len(vbCrLf) + 1) 'get rid of leading vbcrlf (2 chars!)

MyDataObj.SetText myStr
MyDataObj.PutInClipboard

End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

AI32768 wrote:

I'm just interested in stopping Excel adding quotation marks around text
pasted from copied cells into notepad without having to go into notepad and
do endless 'find and replace's afterwards.

Formatting the cells as text makes no difference so why is Excel adding the
quotes in only around cells containing IP addresses? (And putting a tab after
the first quote marks!)


--

Dave Peterson
  #3   Report Post  
Old July 10th 12, 10:19 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2012
Posts: 1
Default How to stop Excel adding quotation marks when copying to notepad?

On Monday, October 26, 2009 8:19:01 AM UTC-4, AI32768 wrote:
I'm just interested in stopping Excel adding quotation marks around text
pasted from copied cells into notepad without having to go into notepad and
do endless 'find and replace's afterwards.

Formatting the cells as text makes no difference so why is Excel adding the
quotes in only around cells containing IP addresses? (And putting a tab after
the first quote marks!)


I was able to get around this issue by highlighting all of my text in Excel, Copying it, then open a new Wordpad document. In Wordpad go to Edit menu and select "Paste Special" then choose "Unformatted Text" and hit OK. Next save your Wordpad document as a text file. No more extra quotes.
  #5   Report Post  
Old January 16th 18, 12:46 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Jan 2018
Posts: 1
Default How to stop Excel adding quotation marks when copying to notepad?

On Monday, 26 October 2009 13:19:01 UTC+1, AI32768 wrote:
I'm just interested in stopping Excel adding quotation marks around text
pasted from copied cells into notepad without having to go into notepad and
do endless 'find and replace's afterwards.

Formatting the cells as text makes no difference so why is Excel adding the
quotes in only around cells containing IP addresses? (And putting a tab after
the first quote marks!)


Finally found a solution for this....!!

If you publish as web, and copy from, there (instead of from the GSheet directly), then it doesn't add the double quotation mark

Not ideal, but does the trick ;p


  #6   Report Post  
Old August 6th 19, 02:15 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Aug 2019
Posts: 1
Default How to stop Excel adding quotation marks when copying to notepad?

In my case it was caused by having a carriage return (CR) in one of the cells that was forming the text string. This resulted in excel adding the double quotes around the string. When I removed the CR then Excel no longer added the additional double quotes.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel adds quotation marks when pasting text Justin Larson[_2_] Excel Discussion (Misc queries) 6 January 12th 09 05:02 PM
how do i add quotation marks to every item in a column in excel s4mans Excel Discussion (Misc queries) 0 April 15th 08 07:51 PM
How to stop Excel from inserting quotation marks into TXT files Dan Falk Excel Discussion (Misc queries) 1 April 13th 07 03:54 PM
Adding Quotation Marks to Data already in Mulitple Cells Ron Setting up and Configuration of Excel 3 February 23rd 07 06:15 PM
Excel Quotation Marks! MaxFrance Excel Discussion (Misc queries) 6 March 29th 05 10:45 AM


All times are GMT +1. The time now is 02:48 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017