Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
exotic jewelry box | Excel Discussion (Misc queries) | |||
Exotic Menu Controls | Excel Programming | |||
A Chart for breeding, incubation, eggs, of exotic birds | Excel Discussion (Misc queries) | |||
Exotic Bets Spreadsheet - Need Help! | Excel Discussion (Misc queries) | |||
Exotic CheckBox | Excel Programming |