Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy outside Clipboard contents (html page) to a cell in Excel
Hi,
I have a webpage from which i am selecting & copying vertical data. Now I open Excel & select Cell A5 & then right-click & select PasteSpecial, then in PasteSpecial window, select Values & Transpose, to transpose data horizontally. I want to automate the whole process so that once i select & copy webpage data, it should already be available in windows Clipboard, so that once i open Excel, i just need to click on a button & it will collect data & paste it horizontally from cell A5. Also, once row cells are filled, the next time i enter another webpage data, it should paste it horizontally to cell A6 below. Please help! Sifar |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy outside Clipboard contents (html page) to a cell in Excel
Dim i As Long
i = ActiveSheet.UsedRange.Rows.Count + 1 Range("A" & i).PasteSpecial Paste:=xlPasteValues, Transpose:=True The value for 'i' above will only work if there are no other entries in other columns in rows below the target. If so, search 'last cell' in this group to find plenty of examples on how to get the last non-empty row in a column. HTH, Nick Hebb http://www.breezetree.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy outside Clipboard contents (html page) to a cell in Excel
Hi,
Thanks for Replying. I am trying this code to get clipboard contents. ============================================= Public Function GetOffClipboard() As Variant Rem Here, if Clipboard is empty, i get an Error message. I want to let user know that he/she has not copied anything to clipboard & then either exit from or ask for input. How do i check if Clipboard is Empty? Dim MyDataObj As New DataObject MyDataObj.GetFromClipboard GetOffClipboard = MyDataObj.GetText() End Function Sub Pastetxt() With Worksheets(1) GetOffClipboard Dim i As Long Rem I need a Check here. so that it can detect Row empty & paste the clipboard content into each Column cell on Current ROW. Sort of a LOOP which will check if the current row is Empty or not. If its Empty, will paste Clipboard contents to current ROW(always starting from 1st Column), Else will move Row+1 i.e. next Row & then Paste to Below Row. i = ActiveSheet.UsedRange.Rows.Count + 1 .Range("A" & i).PasteSpecial Paste:=xlPasteValues, Transpose:=True End With End Sub Warm Regards, Eijaz *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create HTML code for a hyperlink from cell contents | Excel Worksheet Functions | |||
How could I display an excel cell contents in a page header ? | Excel Worksheet Functions | |||
Copy contents to another page | Excel Worksheet Functions | |||
copy cell contents to different page | Excel Discussion (Misc queries) | |||
how do I keep clipboard contents active in excel? | Excel Discussion (Misc queries) |