Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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

Thanks!

share|improve this question
    
what's the problem you're actually trying to solve, maybe there is an easier solution (like a python snippet that outputs a csv file) –  Tyler Dec 28 '09 at 19:37

1 Answer 1

up vote 0 down vote accepted

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
End Sub
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.