View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tony Sinclair Tony Sinclair is offline
external usenet poster
 
Posts: 5
Default OpenText Method Question

On Thu, 29 Mar 2007 20:29:58 -0500, Dave Peterson
wrote:

After you paste into excel, turn on the macro recorder.

Then select the range you just pasted
data|text to columns
And follow that wizard.

Stop the recorder and look at the code.


Thank you, this looks promising. There are some problems I'll have to
tinker with:
If I do a simple paste, the whole table is pasted as one row, so that
doesn't work.
If I do a paste special as text, there is more than one column, and
the Text to Columns wants just one column at a time.
If I do a Text to Columns on an interior column, it doesn't move the
following columns over like the Import Text wizard does; it overwrites
them.

Still, it looks like if I play with it for a while, I can figure a way
to make it work --- working from right to left, and moving columns
over to create the space I need as I go.

=======
Then as a second assignment, start a new (test) workbook.

Data|Import External data|New Web Query
(xl2003's wording)
and follow that wizard.

And see if you like that.


I could not get this to work. In Excel 2K7, I assume that the
equivalent command is Data|Get External Data|From Web, and it pops up
a form for me to enter the URL. The selection from the web page seems
to work, but what the result is always an error message - probably
because the table is generated by a script on the page, so the URL
isn't enough.

I'll play with the first suggestion some more tonight. Thanks again.