0

I am fetching data from a third party software in the form of CSV; while the remaining data is downloaded correctly; whilst there is one column that returns PHP codes. This code contains useful information and I now want this to be in different Excel columns.

Please see the code below:

<table border="0" cellpadding="0" cellspacing="0" width="622">
<colgroup><col style="mso-width-source:userset;mso-width-alt:4096;width:84pt" width="112">
    <col style="mso-width-source:userset;mso-width-alt:2084;width:43pt" width="57">
    <col style="mso-width-source:userset;mso-width-alt:4827;width:99pt" width="132">
    <col style="mso-width-source:userset;mso-width-alt:2560;width:53pt" width="70">
    <col style="mso-width-source:userset;mso-width-alt:5961;width:122pt" width="163">
    <col style="mso-width-source:userset;mso-width-alt:3218;width:66pt" width="88">
</colgroup>
<tbody>
    <tr style="height:15.0pt" height="20">
        <td class="xl66" style="height:15.0pt;width:84pt" height="20" width="112">16</td>
        <td class="xl66" style="border-left:none;width:43pt" width="57">2014-1</td>
        <td class="xl68" style="border-left:none;width:99pt" width="132">MBA-(EL)</td>
        <td class="xl67" style="border-left:none;width:53pt" width="70">1st Set</td>
        <td class="xl66" style="border-left:none;width:122pt" width="163">Adora Larissa D`mello</td>
        <td class="xl68" style="border-left:none;width:66pt" width="88">GGN3163780</td>
    </tr>
    <tr style="height:15.0pt" height="20">
        <td class="xl66" style="height:15.0pt;border-top:none" height="20">34</td>
        <td class="xl66" style="border-top:none;border-left:none">2014-1</td>
        <td class="xl68" style="border-top:none;border-left:none">MBA-(EL)</td>
        <td class="xl67" style="border-top:none;border-left:none">1st Set</td>
        <td class="xl66" style="border-top:none;border-left:none">Ramizraj Rashid Shaikh</td>
        <td class="xl68" style="border-top:none;border-left:none">GGN3163781</td>
    </tr>
    <tr style="height:15.0pt" height="20">
        <td class="xl66" style="height:15.0pt;border-top:none" height="20">38</td>
        <td class="xl66" style="border-top:none;border-left:none">2014-1</td>
        <td class="xl68" style="border-top:none;border-left:none">MBA-(EL)</td>
        <td class="xl67" style="border-top:none;border-left:none">1st Set</td>
        <td class="xl66" style="border-top:none;border-left:none">Girish V</td>
        <td class="xl68" style="border-top:none;border-left:none">GGN3163782</td>
    </tr>
    <tr style="height:15.0pt" height="20">
        <td class="xl66" style="height:15.0pt;border-top:none" height="20">39</td>
        <td class="xl66" style="border-top:none;border-left:none">2014-1</td>
        <td class="xl68" style="border-top:none;border-left:none">MBA-(EL)</td>
        <td class="xl67" style="border-top:none;border-left:none">1st Set</td>
        <td class="xl66" style="border-top:none;border-left:none">Greatful S P</td>
        <td class="xl68" style="border-top:none;border-left:none">GGN3163783</td>
    </tr>
    <tr style="height:15.0pt" height="20">
        <td class="xl66" style="height:15.0pt;border-top:none" height="20">41</td>
        <td class="xl66" style="border-top:none;border-left:none">2014-1</td>
        <td class="xl68" style="border-top:none;border-left:none">MBA-(EL)</td>
        <td class="xl67" style="border-top:none;border-left:none">1st Set</td>
        <td class="xl66" style="border-top:none;border-left:none">Susanta Kumar Mallick</td>
        <td class="xl68" style="border-top:none;border-left:none">GGN3163784</td>
    </tr>
</tbody>
</table>

This code contains five rows of information with six fields, i.e., roll number, batch, course, semester, name and unique ID.

I just want to convert this code in Excel so that I may be able to see the data as below in different columns:

16    2014-1    MBA-(EL)    1st Set    Adora Larissa D`mello     GGN3163780
34    2014-1    MBA-(EL)    1st Set    Ramizraj Rashid Shaikh    GGN3163781
38    2014-1    MBA-(EL)    1st Set    Girish V                  GGN3163782
39    2014-1    MBA-(EL)    1st Set    Greatful S P              GGN3163783
41    2014-1    MBA-(EL)    1st Set    Susanta Kumar Mallick     GGN3163784

I am sorry, I am a novice. Please forgive me for any errors in making this understandable.

I have already tried text to column, but whenever I try doing this the above code creates only three columns and deletes the remaining data (This might be due to data limitations per cell), wherein, the data that I wanted to convert actually gets deleted.

Any help will be appreciated.

11
  • What are you actually asking? How do you get this middle column? Are you extracting it and saving it to CSV then you want to open the CSV file and just change the layout of the data? Also, you've not made enough effort with your question's format, please take the time to lay it out correctly!
    – Dave
    Commented Dec 17, 2013 at 8:44
  • Please don't cross-post: stackoverflow.com/questions/20559401/… — your question is probably better suited here, so you can delete the version on SO. Thanks
    – slhck
    Commented Dec 17, 2013 at 9:00
  • @DaveRook: Thanks! Let me try explain it again. I exported the data from a third party software in the form of CSV file. Though the export of all the columns was done successfully; however, there is one column that was exported in the form of above codes. There are over 1000 entries with this code that I want to convert in such a format that it can give me the data in five different cells as mentioned above. Commented Dec 17, 2013 at 12:43
  • So, the CSV file with the 1 column, does this include the HTML or just the values?
    – Dave
    Commented Dec 17, 2013 at 12:44
  • 1
    I don't see any PHP here? Am I correct in understanding you want to convert the HTML table to Excel data? Like described here?
    – ernie
    Commented Dec 18, 2013 at 1:42

1 Answer 1

0

rename the php file to HTML,or drag it to a browser. you will see the table. just copy and paste it to Excel.

3
  • Sorry Truthurt! but we are not talking about the PHP/HTML file here. The data is in multiple rows (approx. 1000) in excel. Apparently, I have already tried the above solution, but is not helpful. Thanks for the suggestion anyways! Commented Dec 18, 2013 at 11:42
  • may you need to write a script to extract the data to a format that excel can read.or else,excel won't be able to parse the file.
    – truthurt
    Commented Dec 19, 2013 at 1:06
  • Sorry Truthurt! but I have seen this happening somewhere and I am unable to recall that now, but I know this is possible in Excel. Commented Dec 19, 2013 at 5:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .