Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data importing prob
Hi,
I'm trying to get data imported from website to excel. The link. http://www.douanes.ci/Services/Grppr...MaJ=29/02/2008 This is code 01 to 97 is called chapter wise data. Click 01 data will come. How can i extract hole data in one shot. (01 to 97) Does anyone know a way arround it? Anything would help. Thanks! Yours loving friend |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data importing prob
Sub Macro1()
' ' Macro1 Macro ' Macro recorded 3/21/2008 by jwarburg ' ' With ActiveSheet.QueryTables.Add(Connection:= _ "URL;http://www.douanes.ci/Services/Grpproduit.asp?DateMaJ=29/02/2008", _ Destination:=Range("A1")) .Name = "2008" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebTables = "5" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With End Sub "mohan" wrote: Hi, I'm trying to get data imported from website to excel. The link. http://www.douanes.ci/Services/Grppr...MaJ=29/02/2008 This is code 01 to 97 is called chapter wise data. Click 01 data will come. How can i extract hole data in one shot. (01 to 97) Does anyone know a way arround it? Anything would help. Thanks! Yours loving friend |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data importing prob
I modified the code to get the actual data. The access to the webpage is
slow. Below the code gets the first 3 chapters. Modify the code from 1 to 3 to 1 to 97 to get all the pages. The code creates a new worksheet for each chapter. I you run the code more than once it will give you an error because you are creating the same worksheet more than once. Sub Macro2() ' ' Macro2 Macro ' Macro recorded 3/21/2008 by jwarburg ' ' For chapt = 1 To 3 Worksheets.Add after:=Sheets(Sheets.Count) ChaptNum = Format(chapt, "0#") ChaptName = "Chapter " & ChaptNum ActiveSheet.Name = ChaptName With ActiveSheet.QueryTables.Add(Connection:= _ "URL;http://www.douanes.ci/Services/resultpchap.asp?code=" & _ ChaptNum & "&DateMaJ=29/02/2008" _ , Destination:=Sheets(ChaptName).Range("A1")) .Name = "2008" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebTables = "5" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With Next chapt End Sub "mohan" wrote: Hi, I'm trying to get data imported from website to excel. The link. http://www.douanes.ci/Services/Grppr...MaJ=29/02/2008 This is code 01 to 97 is called chapter wise data. Click 01 data will come. How can i extract hole data in one shot. (01 to 97) Does anyone know a way arround it? Anything would help. Thanks! Yours loving friend |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Removing Data Tables formed from importing data from Access | Excel Discussion (Misc queries) | |||
Prob with ChartSource DataData Range | Charts and Charting in Excel | |||
Urgent! Prob with Excel 2002 Template Wizard with Data Tracking ad | Excel Discussion (Misc queries) | |||
Importing data from Access into Excel: prob w/ cutting off fields | Excel Worksheet Functions | |||
Prob with Var Data-types.. | Excel Programming |