بھئی آج یہی سوال غالباً آپ ہی نے کسی کی معرفت ہم سے بذریعہ ای میل پوچھا تھا۔ اور ہم نے جواب بھی لکھا تھا۔ ممکن ہے کہ جواب آپ تک نہ پہونچا ہو۔ خیر اس وقت انتہائی مصروف تھا اور فوری طور پر جو تدبیر بتا سکا تھا وہ درج ذیل ہے۔
=============
اس کا سہل ترین طریقہ یہ سمجھ میں آتا ہے کہ ایکسل فائل سی ایس وی میں امپورٹ کر لیں۔ اور پھر فائنڈ رپلیس کی مدد سے اضافی چیزوں مثلاً سیپریٹرس وغیرہ کو ایچ ٹی ایم ایل کے ایسے کوڈ سے بدل دیں جو اسے ایک ایچ ٹی ایم ایل سیل میں مرتب کر دے۔ چوں کہ آپ کے پاس ایڈوانسڈ پروگرامنگ ایڈیٹر شاید نہ ہوں اس لئے نیو لائن وغیرہ کو شاید آپ ریڈ کر کے ریپلیس نہ کر سکیں۔ اس کا حل یہ ہے کہ ایکسیل شیٹ میں دو کام کے کالمز کے پہلے اور بعد میں اضافی کالمز شامل کر دیں اور ان میں کوئی یکسا متن لکھ دیں اس طرح وہ ڈیلیمیٹر کا کام کرے گا۔ میں سٹیپس بتانے کی کوشش کرتا ہوں۔
Your excel sheet might look like this:
| topic 1 | 23 |
| topic 2 | 25 |
| topic 3 | 30 |
| topic 4 | 37 |
Make it like this:
| start | topic 1 | 23 | end |
| start | topic 2 | 25 | end |
| start | topic 3 | 30 | end |
| start | topic 4 | 37 | end |
Now import in CSV, you will find something like this:
"start","topic 1","23","end"
"start","topic 2","25","end"
"start","topic 3","30","end"
"start","topic 4","37","end"
Now you can open it in any text editor like Notepad, Wordpad or any other simple formatting free editor of your choice. and do the following replacements:
"start"," => <tr><td>
<tr><td>topic 1","23","end"
<tr><td>topic 2","25","end"
<tr><td>topic 3","30","end"
<tr><td>topic 4","37","end"
","end" => </td></tr>
<tr><td>topic 1","23</td></tr>
<tr><td>topic 2","25</td></tr>
<tr><td>topic 3","30</td></tr>
<tr><td>topic 4","37</td></tr>
"," => </td><td>
<tr><td>topic 1</td><td>23</td></tr>
<tr><td>topic 2</td><td>25</td></tr>
<tr><td>topic 3</td><td>30</td></tr>
<tr><td>topic 4</td><td>37</td></tr>
This is what you want. Just add initial and final rows to make it a complete table like this:
<table>
<tr><td>topic 1</td><td>23</td></tr>
<tr><td>topic 2</td><td>25</td></tr>
<tr><td>topic 3</td><td>30</td></tr>
<tr><td>topic 4</td><td>37</td></tr>
</table>
And if you want to have column header, you can add another row for that like this:
<table>
<tr><th>Col 1</th><th>Col 2</th></tr>
<tr><td>topic 1</td><td>23</td></tr>
<tr><td>topic 2</td><td>25</td></tr>
<tr><td>topic 3</td><td>30</td></tr>
<tr><td>topic 4</td><td>37</td></tr>
</table>
And you are done!
Hope this will do the trick.