Export TCX file

Vanja -  
yclik Posted messages 3882 Registration date   Status Member Last intervention   -
Hello,

I have data in TCX format and I need to process it in LibreOffice Calc.

When I open my TCX file in LibreOffice, everything displays like this in a single column:

<Activities>
<Activity Sport="Running">
<Id>2019-06-21T14:58:49.000Z</Id>
<Lap StartTime="2019-06-21T14:58:49.000Z">
<TotalTimeSeconds>351.0</TotalTimeSeconds>
<DistanceMeters>1000.0</DistanceMeters>
<MaximumSpeed>3.059999942779541</MaximumSpeed>
<Calories>53</Calories>
<AverageHeartRateBpm>
<Value>140</Value>
</AverageHeartRateBpm>
<MaximumHeartRateBpm>
<Value>160</Value>
</MaximumHeartRateBpm>
<Intensity>Active</Intensity>
<TriggerMethod>Manual</TriggerMethod>
<Track>
<Trackpoint>
<Time>2019-06-21T14:58:49.000Z</Time>
<Position>
<LatitudeDegrees>46.9615463912487</LatitudeDegrees>
<LongitudeDegrees>6.8697604816406965</LongitudeDegrees>
</Position>
<AltitudeMeters>433.6000061035156</AltitudeMeters>

I would like to know if there is a macro that can recognize the names between <> and transform them into columns.

Like a macro that says "if the text contains <speed> then place this number in a column."

There you go, I hope my question is clear enough.

Thank you in advance for your responses and your help.

Have a great day everyone.

2 answers

  1. OOoForum Posted messages 3871 Registration date   Status Member Last intervention   965
     
    TCX = Garmin = XML
    No need for a macro to do this, you need to create an XSLT filter.
    Explanations here: http://beaussier.com/sections/viewtopic.php?f=8&t=1560

    .
    --
    Why hack MS-Office when there is a free solution?
    Use OpenOffice.
    2
  2. yclik Posted messages 3882 Registration date   Status Member Last intervention   1 612
     
    Good evening
    there is also the option to split into columns
    select the column
    Data > text to columns
    check "Other" and use > as the separator

    on the remaining column
    repeat with <
    0