Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel
|
|||
|
|||
![]()
GS wrote:
You are getting all of the right stuff from what i would call the second file. The first file is "https://www.nsncenter.com/NSNSearch?q=5960%20regulator&PageNumber=" & PageNum where PagNum (in ASCII) goes from "1" to "999". Note the (implied?) space in the URL. I got Source, NSN Part#, Description from the 1st file. The NSN Item# links to the 2nd file. <snip Would you be so kind as to share your working ADODB code? Or did you hand-copy the source like i did? I use std VB file I/O not ADODB. Initial procedure was to copy/paste page source into Textpad and save as Tmp.txt. Then load the file into an array and parse from there. I thought I'd take a look at going with a userform and MS Web Browser control for more flexible programming opts, but haven't had the time. I assume this would definitely give you an advantage over trying to automate IE, but I need to research using it. I do have URL functions built into my fpSpread.ocx for doing this stuff, but that's an expensive 3rd party AX component. Otherwise, doing this from Excel isn't something I'm familiar with. Check. I know QBASIC fairly well, so a lot of that knowledge crosses over to VB. Someone here was kind enough to give me a full working program that can be used to copy a URL source to a temp file on the HD. Once available all else is very simple and straight forward. The rub is that function (or something it uses) does not allow a space in the URL,AND also does not allow https. So, i need two work-arounds, and the https part would seem to be the worst. I do not know how it works, what DLLs/libraries it calls; no useful information is available. It is: Declare Function URLDownloadToFile Lib "urlmon" _ Alias "URLDownloadToFileA" (ByVal pCaller As Long, _ ByVal szURL As String, ByVal szFileName As String, _ ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Only the well-known keywords can be found; 'urlmon', 'pCaller', 'szURL', and 'szFileName' are unknowns and not findable in the so-called VB help. And there are no examples; the few ranDUMB ones are incomplete and/or do not work.. I do not see how you use std VB file I/O; AFAIK one cannot open a web page as if it was a file. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
EOF Parse Text file | Excel Programming | |||
Parse a txt file and save as csv? | Excel Programming | |||
parse from txt file | Excel Programming | |||
Parse File Location | Excel Worksheet Functions | |||
REQ: Simplest way to parse (read) HTML formatted data in via Excel VBA (or VB6) | Excel Programming |