PDA

View Full Version : Excel Hide CSV url during transfer



steak
07-29-2015, 03:15 AM
Hi

I am using the following macro to download a csv from the internet and to put it into my worksheet:


Sub transferCSV(urlCSV)

Application.ScreenUpdating =False

Cells.ClearContents


With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;"& urlCSV, _
Destination:=Range("$A$1"))
.FieldNames =True
.RowNumbers =False
.FillAdjacentFormulas =False
.PreserveFormatting =True
.RefreshOnFileOpen =False
.RefreshStyle = xlInsertDeleteCells
.SavePassword =False
.SaveData =True
.AdjustColumnWidth =True
.RefreshPeriod =0
.TextFilePromptOnRefresh =False
.TextFilePlatform =65001
.TextFileStartRow =1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter =False
.TextFileTabDelimiter =False
.TextFileSemicolonDelimiter =True
.TextFileCommaDelimiter =False
.TextFileSpaceDelimiter =False
.TextFileColumnDataTypes = Array(1,1,1)
.TextFileTrailingMinusNumbers =True
.Refresh BackgroundQuery:=False
EndWith

EndSub

Url of the csv is shown during this transfer. Is there a way to hide it ? I don't want user to see the sources.

Thanks