tags:

views:

64

answers:

2

How do I force Excel to download http://api.eve-central.com/api/evemon, parse it and format the values in a table?

I tried importing the XML and it worked, but I don't know what to do from here.

Thanks!

A: 

Depends what you want to do with it. You can use String Cell formulas to extract your data from the cells. So if you can get each data element into a different Excel row, you can use the MID and FIND functions to extract the data.

so if A1 was the cell where you have your data,

=MID(A1, FIND("<name>", A1)+6, LEN(A1))

would give you the substring from the beginning of the tag:

an alternate solution would be to copy it from Excel and paste it into a text file, rename this as .xml, and use XSL to transform it into HTML.

It depends where your skillsets lie.

funkymushroom
A: 

If you are using Data|Import External Query|New Web Query, there is a param, RefreshOnFileOpen, that you can just set to True.

Here is a snip that gets the data from the net, but doesn't format it (since you said you already got that working).



Range("I12").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://api.eve-central.com/api/evemon", Destination:=Range("I12"))
        .Name = "evemon_1"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = True
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlEntirePage
        .WebFormatting = xlWebFormattingNone
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With

WireGuy