Skip to main content
Inspiring
February 27, 2007
Question

OT: characters in paste from Excel

  • February 27, 2007
  • 9 replies
  • 535 views
I am trying to find out how Excel divides content between cells when you
copy a row/column of cells and paste it into a textarea.

Let's say I have two rows and each row has two cells of information, like
this -

Cell1.1 Cell2.1
Cell1.2 Cell2.2

and I copy and paste those 4 cells into a text area.

If I then want to separate the contents of Cell1.1 from Cell2.1 as separate
variables for further processing in PHP, how can I do that? I already know
that the two cells are not separated with a space.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================



This topic has been closed for replies.

9 replies

Inspiring
February 28, 2007
On Tue, 27 Feb 2007 15:59:28 -0500, "Murray *ACE*"
<forums@HAHAgreat-web-sights.com> wrote:

>It was a tab character, but my keyboard entered the wrong PHP code! 8(

Silly keyboard. ;-)


>Thanks!

You're welcome.

Gary
Inspiring
February 27, 2007
I know. It's deeply objectionable.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Michael Fesser" <netizen@gmx.de> wrote in message
news:ue79u2ti32t52vvo8cpnd9ngeho12h2qqp@4ax.com...
> .oO(Murray *ACE*)
>
>>It was a tab character, but my keyboard entered the wrong PHP code! 8(
>
> I have a guitar, which is quite the same. It (she?) never plays the
> chords I want it to play. ;)
>
> Micha


Inspiring
February 27, 2007
.oO(Murray *ACE*)

>It was a tab character, but my keyboard entered the wrong PHP code! 8(

I have a guitar, which is quite the same. It (she?) never plays the
chords I want it to play. ;)

Micha
Inspiring
February 27, 2007
Gary:

It was a tab character, but my keyboard entered the wrong PHP code! 8(

Thanks!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Gary White" <reply@newsgroup.please> wrote in message
news:j209u2lrgd5kbsmt093lm7c1opd5t9oi5i@4ax.com...
> On Tue, 27 Feb 2007 13:22:02 -0500, "Murray *ACE*"
> <forums@HAHAgreat-web-sights.com> wrote:
>
>>That's what I thought, but when I do a str_replace('\x09','-',$content);,
>>it
>>doesn't find it.
>
>
> Where are you trying to do the replace? In PHP? Try:
>
> preg_replace("/\t/","-",$content);
>
> If in DW, in code view,
> Find: \t
> Replace with: -
> Use Regular Expressions
>
> If neither of those, where?
>
> Gary


Inspiring
February 27, 2007
That was certainly easy - right you are. Thanks, Micha!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Michael Fesser" <netizen@gmx.de> wrote in message
news:1a19u25ke4o2ekrrbcaosfpq2opgu2vgkb@4ax.com...
> .oO(Murray *ACE*)
>
>>That's what I thought, but when I do a str_replace('\x09','-',$content);,
>>it
>>doesn't find it.
>
> The above searches for a literal '\x09' (4 chars!). You have to use
> double quotes around the string, so PHP will replace these special
> escape sequences, e.g. "\x09" or "\t".
>
> You could also check with ord() what character it actually is.
>
> Micha


Inspiring
February 27, 2007
.oO(Murray *ACE*)

>That's what I thought, but when I do a str_replace('\x09','-',$content);, it
>doesn't find it.

The above searches for a literal '\x09' (4 chars!). You have to use
double quotes around the string, so PHP will replace these special
escape sequences, e.g. "\x09" or "\t".

You could also check with ord() what character it actually is.

Micha
Inspiring
February 27, 2007
On Tue, 27 Feb 2007 13:22:02 -0500, "Murray *ACE*"
<forums@HAHAgreat-web-sights.com> wrote:

>That's what I thought, but when I do a str_replace('\x09','-',$content);, it
>doesn't find it.


Where are you trying to do the replace? In PHP? Try:

preg_replace("/\t/","-",$content);

If in DW, in code view,
Find: \t
Replace with: -
Use Regular Expressions

If neither of those, where?

Gary
Inspiring
February 27, 2007
That's what I thought, but when I do a str_replace('\x09','-',$content);, it
doesn't find it.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Gary White" <reply@newsgroup.please> wrote in message
news:11t8u25eap73a83djvtm4ltfqqkk7nhpk7@4ax.com...
> On Tue, 27 Feb 2007 12:42:28 -0500, "Murray *ACE*"
> <forums@HAHAgreat-web-sights.com> wrote:
>
>>I already know
>>that the two cells are not separated with a space.
>
>
> As far as I know, they're separated by tabs.
>
> Gary


Inspiring
February 27, 2007
On Tue, 27 Feb 2007 12:42:28 -0500, "Murray *ACE*"
<forums@HAHAgreat-web-sights.com> wrote:

>I already know
>that the two cells are not separated with a space.


As far as I know, they're separated by tabs.

Gary