# VBA excel paste to web html

**URL:** <https://boards.straightdope.com/t/vba-excel-paste-to-web-html/764659>\
**Category:** Factual Questions\
**Created:** [September 1, 2016, 2:23pm UTC](https://boards.straightdope.com/t/vba-excel-paste-to-web-html/764659 "2016-09-01T14:23:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![papafi](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@papafi](https://boards.straightdope.com/u/papafi)\
**Post date:** [September 1, 2016, 2:23pm UTC](https://boards.straightdope.com/t/vba-excel-paste-to-web-html/764659/1 "2016-09-01T14:23:59Z")

</div>

Dear all,

I am new here and as much as I could I searched for my answer but never got the one I wanted.

I want to create a VBA to be able to past a specific column from a specific worksheet from an Excel file to a web page and then “click” a button to generate the outcome.

I have created this so far:

* * *

Sub papafi\_1\_command()

ThisWorkbook.Activate  
Sheets(“RPInputs”).Select

Sheets(“RPInputs”).Range(“C7:C10005”).Select  
Selection.Copy  
Sheets(“Sheet2”).Select  
Range(“L7”).Select  
ActiveSheet.Paste

Workbooks.Open (“C:\Users\FilipposP\Downloads\deprivation-by-postcode (6)”)  
Sheets(“Sheet1”).Select

Sheets(“Sheet1”).Range(“A1:AB9999”).Select  
Selection.Copy

ThisWorkbook.Activate  
Sheets(“Sheet1”).Select  
Sheets(“Sheet1”).Range(“A1:AB9999”).Select  
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= \_  
False, Transpose:=False

End Sub

* * *

With which I am able to copy paste from a different excel file to my working one and then copy a column from this new data to another sheet.

What I would like is to be able to instead copy the latest to another spreadsheet go online at:

> **[English indices of deprivation 2019: Postcode Lookup](https://imd-by-postcode.opendatacommunities.org/imd/2019)**
>
> Build your own custom CSV or Excel download for the English Indices of Deprivation 2019 by entering or uploading Postcodes.

and paste there the column, and then click the button to generate outcome…

Thanks for the help. Any clarification questions please ask!

---

<div class="post-metadata">

**Author:** ![TroutMan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/troutman/32/6721_2.png) [@TroutMan](https://boards.straightdope.com/u/TroutMan)\
**Post date:** [September 1, 2016, 6:48pm UTC](https://boards.straightdope.com/t/vba-excel-paste-to-web-html/764659/2 "2016-09-01T18:48:22Z")

</div>

The question isn’t really the VBA, it’s how to connect to the service that will be hosting this web page or spreadsheet. Your first step is to look at the APIs and maybe search/post on a forum that is specific to that hosting platform. Note that depending on how that platform works, accessing it directly from Excel VBA might not be possible.

I found this [link to the APIs](http://docs.publishmydata.com/) and developer documentation on the link you provided. Start there, and good luck.
