This helps absolutely ! Thanks a lot!!Homer wrote:You can do this very easy - directly from MS Excel with the concatenate function!
Say you have an Excel sheet with 4 columns. Then you put in the fifth column the next statement;
You can break this down to;Code: Select all
=CONCATENATE("<tr><td>";A1;"</td><td>";B1;"</td><td>";C1;"</td><td>";D1;"</td></tr>")
For example, rows 16 to 18 of the sheet in which I have the CTSW production list, in cells E16, E17 and E18 I used:
==> start of the expressionCode: Select all
=CONCATENATE(
==> separations of the different items in this statementCode: Select all
;
==> HTML start of your table row and first table cell. Note the quotes are mandatory!Code: Select all
"<tr><td>"
==> HTML colusre of previous cell and opening of next cell. Again the quotes are needed.Code: Select all
"</td><td>"
==> HTML closure of the last data cell and of the table rowCode: Select all
"</td></tr>"
==> contents of Excel cell A1Code: Select all
A1
==> contents of Excel cell B1 (etc)Code: Select all
B1
==> end of the expressionCode: Select all
)
This had the next 'output';Code: Select all
=CONCATENATE("<tr><td>";A16;"</td><td>";B16;"</td><td>";C16;"</td><td>";D16;"</td></tr>") =CONCATENATE("<tr><td>";A17;"</td><td>";B17;"</td><td>";C17;"</td><td>";D17;"</td></tr>") =CONCATENATE("<tr><td>";A18;"</td><td>";B18;"</td><td>";C18;"</td><td>";D18;"</td></tr>")
only thing you have to do then is copy the complete column to an "ASCII editor with some extras" - like Notepad++ (FREE!), UltraEdit32 or Notetab (Freeware version available) - which has the ability to 'join lines'.Code: Select all
<tr><td>OE-7117</td><td>97-10-02-011</td><td>CT</td><td>ex D-MYYZ</td></tr> <tr><td>D-MZES</td><td>97-10-03-12</td><td>CT</td><td></td></tr> <tr><td>D-MWMA</td><td>97-11-01-13 ?</td><td>CT</td><td>c/n quoted as 97-11-03-13</td></tr>
First you insert anon the first line - note I also used the 'valign="top"' statement is I personally find the output much prettier when data is split over multiple linesCode: Select all
<table class="genmed" width="800" valign="top">
At the end of the list you put the table closure tag;So now you have something like the following in your editor;Code: Select all
</table>
In your editor (the ordinary Notepad does not have this ability!) now join all these line to one single line, and copy paste it to your MB posting, and this gives the next output;Code: Select all
<table class="genmed" width="800" valign="top"> <tr><td>OE-7117</td><td>97-10-02-011</td><td>CT</td><td>ex D-MYYZ</td></tr> <tr><td>D-MZES</td><td>97-10-03-12</td><td>CT</td><td></td></tr> <tr><td>D-MWMA</td><td>97-11-01-13 ?</td><td>CT</td><td>c/n quoted as 97-11-03-13</td></tr> </table>
<table class="genmed" width="800" valign="top"><tr><td>OE-7117</td><td>97-10-02-011</td><td>CT</td><td>ex D-MYYZ</td></tr><tr><td>D-MZES</td><td>97-10-03-12</td><td>CT</td><td></td></tr><tr><td>D-MWMA</td><td>97-11-01-13 ?</td><td>CT</td><td>c/n quoted as 97-11-03-13</td></tr></table>
Hope this helps!
Code: Select all
[pre] ... [/pre]
338/4-CG Mirage 2000N EC03.004 38+10 F-4F JG74 MM7173/51-21 AMX 51St/132 Gr...put in this
Code: Select all
[pre]338/4-CG Mirage 2000N EC03.004
38+10 F-4F JG74
MM7173/51-21 AMX 51St/132 Gr[/pre]
Code: Select all
[TABLE 300]
Code: Select all
[TR]
[TD]338/4-CG[/TD]
[TD]Mirage 2000N[/TD]
[TD]EC03.004[/TD]
[/TR]
Code: Select all
[TABLE 300]
[TR][TD]338/4-CG[/TD][TD]Mirage 2000N[/TD][TD]EC03.004[/TD][/TR]
[TR][TD]362/4-CU[/TD][TD]Mirage 2000N[/TD][TD]EC03.004[/TD][/TR]
[TR][TD]38+10[/TD][TD]F-4F[/TD][TD]JG74[/TD][/TR]
[TR][TD]38+29[/TD][TD]F-4F[/TD][TD]JG74[/TD][/TR]
[TR][TD]MM7186/51-05[/TD][TD]AMX[/TD][TD]51St/103 Gr[/TD][/TR]
[TR][TD]MM7173/51-21[/TD][TD]AMX[/TD][TD]51St/132 Gr[/TD][/TR]
[/TABLE]
Code: Select all
[TABLE 300][TR][TD]338/4-CG[/TD][TD]Mirage 2000N[/TD][TD]EC03.004[/TD][/TR][TR][TD]362/4-CU[/TD][TD]Mirage 2000N[/TD][TD]EC03.004[/TD][/TR][TR][TD]38+10[/TD][TD]F-4F[/TD][TD]JG74[/TD][/TR][TR][TD]38+29[/TD][TD]F-4F[/TD][TD]JG74[/TD][/TR][TR][TD]MM7186/51-05[/TD][TD]AMX[/TD][TD]51St/103 Gr[/TD][/TR][TR][TD]MM7173/51-21[/TD][TD]AMX[/TD][TD]51St/132 Gr[/TD][/TR][/TABLE]
Code: Select all
[TABLE 500]
[TR]
[TD]Normal text[/TD]
[TD][B]Bold text[/B][/TD]
[TD][U]Underlined text[/U][/TD]
[TD][I]Italic text[/I][/TD]
[/TR]
[/TABLE]
As a member you get access to all our
premium content and benefits learn more