ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   some exotic error (https://www.excelbanter.com/excel-programming/420778-some-exotic-error.html)

God Itself

some exotic error
 
how to fix something like that:

Sub getquery()
a =
"URL;http://www.bankier.pl/inwestowanie/profile/wynikifinansowe/01NFI-jednostkowy-raport-kwartalny.html?offset=0"
b = "any_name_01"
With Sheets("query").QueryTables.Add(Connection:=a,
Destination:=Sheets("query").Range("A1"))
.Name = b
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False 'ERROR LINE ???
End With
End Sub

and error sounds:

Run-time error '-2147417848 (80010108)'
Automation Error
The object invoked has disconnected from its client.


ryguy7272

some exotic error
 
I can't see a problem with the code. Maybe there is a problem on the
server-side? Try to redo it by recording a macro.

Regards,
Ryan---

--
RyGuy


"God Itself" wrote:

how to fix something like that:

Sub getquery()
a =
"URL;http://www.bankier.pl/inwestowanie/profile/wynikifinansowe/01NFI-jednostkowy-raport-kwartalny.html?offset=0"
b = "any_name_01"
With Sheets("query").QueryTables.Add(Connection:=a,
Destination:=Sheets("query").Range("A1"))
.Name = b
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False 'ERROR LINE ???
End With
End Sub

and error sounds:

Run-time error '-2147417848 (80010108)'
Automation Error
The object invoked has disconnected from its client.



God Itself

some exotic error
 
Macro is ok, i know that

but try use it in real file and create a web query..

anyway - how can i download data in spite of server-side problem?

i posted today this problem but from other view:

"Web query causes excel crash!"


Użytkownik "ryguy7272" napisał w
wiadomości ...
I can't see a problem with the code. Maybe there is a problem on the
server-side? Try to redo it by recording a macro.

Regards,
Ryan---

--
RyGuy



joel

some exotic error
 
You'll always get the error on the .REFRESH line because the Query is not
processed until you get to this line.

There is an error on the webpage and it is not caused by your code. You can
see what I mean by going to the excel worksheet menu

Data - Import External Data - New Web Query.

Then enter your URL in the address box and press OK. You'll get errors and
excel will crash.



"God Itself" wrote:

how to fix something like that:

Sub getquery()
a =
"URL;http://www.bankier.pl/inwestowanie/profile/wynikifinansowe/01NFI-jednostkowy-raport-kwartalny.html?offset=0"
b = "any_name_01"
With Sheets("query").QueryTables.Add(Connection:=a,
Destination:=Sheets("query").Range("A1"))
.Name = b
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False 'ERROR LINE ???
End With
End Sub

and error sounds:

Run-time error '-2147417848 (80010108)'
Automation Error
The object invoked has disconnected from its client.



Jim Thomlinson

some exotic error
 
I'm still unclear. So the macro is ok but the server is not responding. You
want the macro to get data anyway? That is like wanting to have a
conversation with someone who will not answer the phone. If the server will
not answer what would you like the macro to do???
--
HTH...

Jim Thomlinson


"God Itself" wrote:

Macro is ok, i know that

but try use it in real file and create a web query..

anyway - how can i download data in spite of server-side problem?

i posted today this problem but from other view:

"Web query causes excel crash!"


Użytkownik "ryguy7272" napisał w
wiadomości ...
I can't see a problem with the code. Maybe there is a problem on the
server-side? Try to redo it by recording a macro.

Regards,
Ryan---

--
RyGuy




Don Guillett

some exotic error
 

I answered this for him privately with a workbook. Problem is that the site
would not allow all tables or that one. Only tables 2,3,4,5,6,9
This question was after I sent the code below with table 9. OP changed to
1....... BANG!! Some just won't take NO for an answer.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"God Itself" wrote in message
...
how to fix something like that:

Sub getquery()
a =
"URL;http://www.bankier.pl/inwestowanie/profile/wynikifinansowe/01NFI-jednostkowy-raport-kwartalny.html?offset=0"
b = "any_name_01"
With Sheets("query").QueryTables.Add(Connection:=a,
Destination:=Sheets("query").Range("A1"))
.Name = b
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False 'ERROR LINE ???
End With
End Sub

and error sounds:

Run-time error '-2147417848 (80010108)'
Automation Error
The object invoked has disconnected from its client.



JLGWhiz

some exotic error
 
Be careful Don, you don't want to offend this OP. <g

"Don Guillett" wrote:


I answered this for him privately with a workbook. Problem is that the site
would not allow all tables or that one. Only tables 2,3,4,5,6,9
This question was after I sent the code below with table 9. OP changed to
1....... BANG!! Some just won't take NO for an answer.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"God Itself" wrote in message
...
how to fix something like that:

Sub getquery()
a =
"URL;http://www.bankier.pl/inwestowanie/profile/wynikifinansowe/01NFI-jednostkowy-raport-kwartalny.html?offset=0"
b = "any_name_01"
With Sheets("query").QueryTables.Add(Connection:=a,
Destination:=Sheets("query").Range("A1"))
.Name = b
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False 'ERROR LINE ???
End With
End Sub

and error sounds:

Run-time error '-2147417848 (80010108)'
Automation Error
The object invoked has disconnected from its client.





All times are GMT +1. The time now is 11:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com