让csv创建但是FileHelpers库(但不要认为它在这里很重要。但是我的csv是逗号分隔文件。我总是在每个字段之间引用。在我的上一栏中我提取html代码。但是当试图打开时在我的html字段列数据的excel部分中的csv将转到第一列,而来自html的一些数据放在excel的B列中有人可以帮助我并告诉我出了什么问题吗?这是确切的例子:
Artikelnummer,Vater,Variation1,Variationswert1,Variation2,Variationswert2,Variation3,Variationswert3,Barcode,Artikelname,Artikelname2,Hersteller,KategorieLevel1,KategorieLevel2,KategorieLevel3,KategorieLevel4,KategorieLevel5,Merkmalname1,Merkmalwertname1,Merkmalname2,Merkmalwertname2,Merkmalname3,Merkmalwertname3,Html
"29.1023.1","","Height","WeiB","","","","","","","","","","Kategoria_A","Podkategoria_A","","co tu?","Height","WeiB","","","","","<meta http-equiv=""content-type"" content=""application/xhtml+xml; charset=UTF-8""/>
<b style=""font-size:22pt;"">Überblick:
</b>
<br>
</br>
<table cellpadding=""10"" cellspacing=""10"" align=""left"" style=""font-size:12pt;table-layout:fixed;width:30%;"">
<tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Marke:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">JUSThome
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Serie:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">blabla
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Artikel-Nr.:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">29.1023.1
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Height:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">Zur auswahl
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Material:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">Material_B1
</td>
</tr>
</table><table cellpadding=""10"" cellspacing=""10"" align=""right"" style=""font-size:12pt;table-layout:fixed;width:70%;"">
<tr>
<td width=""20%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Abmessungen:</td><td width=""80%"" border=""3"" style=""text-align:left;padding-left:20px;""></td>
</tr><tr>
<td width=""20%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Höhe:</td><td width=""80%"" border=""3"" style=""text-align:left;padding-left:20px;"">1,00 cm
</td>
</tr><tr>
<td width=""20%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Breite:</td><td width=""80%"" border=""3"" style=""text-align:left;padding-left:20px;"">2,00 cm
</td>
</tr>
</table><div style=""clear:both !important;"">
</div>
<br>
</br>
<b style=""font-size:22pt;"">Abmessungen im Detail:
</b>
<ul>
<li style=""font-size:12pt;"">Höhe: 1,00 cm</li><li style=""font-size:12pt;"">Breite: 2,00 cm</li>
</ul>
<ul>
<li style=""font-size:12pt;"">Kot : kott </li><li style=""font-size:12pt;"">Swinia : swiania </li>
</ul>
<br>
</br>
<b style=""font-size:22pt;"">Sekcja_A:
</b>
<ul>
<li style=""font-size:12pt;"">WK</li><li style=""font-size:12pt;"">ZW</li>
</ul>
<br>
</br>
<b style=""font-size:22pt;"">Sekcja_Design:
</b>
<ul>
<li style=""font-size:12pt;"">NF</li>
</ul>
<br>
</br>
"
"29.1023.2","","Height","WeiB","","","","","","","","","","Kategoria_A","Podkategoria_A","","co tu?","Height","WeiB","","","","","<meta http-equiv=""content-type"" content=""application/xhtml+xml; charset=UTF-8""/>
<b style=""font-size:22pt;"">Überblick:
</b>
<br>
</br>
<table cellpadding=""10"" cellspacing=""10"" align=""left"" style=""font-size:12pt;table-layout:fixed;width:30%;"">
<tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Marke:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">JUSThome
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Serie:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">blabla
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Artikel-Nr.:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">29.1023.2
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Height:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">WeiB
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Material:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">Material_B1
</td>
</tr>
</table><table cellpadding=""10"" cellspacing=""10"" align=""right"" style=""font-size:12pt;table-layout:fixed;width:70%;"">
<tr>
<td width=""20%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Abmessungen:</td><td width=""80%"" border=""3"" style=""text-align:left;padding-left:20px;""></td>
</tr><tr>
<td width=""20%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Höhe:</td><td width=""80%"" border=""3"" style=""text-align:left;padding-left:20px;"">1,00 cm
</td>
</tr><tr>
<td width=""20%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Breite:</td><td width=""80%"" border=""3"" style=""text-align:left;padding-left:20px;"">2,00 cm
</td>
</tr>
</table><div style=""clear:both !important;"">
</div>
<br>
</br>
<b style=""font-size:22pt;"">Abmessungen im Detail:
</b>
<ul>
<li style=""font-size:12pt;"">Höhe: 1,00 cm</li><li style=""font-size:12pt;"">Breite: 2,00 cm</li>
</ul>
<ul>
<li style=""font-size:12pt;"">Kot : kott </li><li style=""font-size:12pt;"">Swinia : swiania </li>
</ul>
<br>
</br>
<b style=""font-size:22pt;"">Sekcja_A:
</b>
<ul>
<li style=""font-size:12pt;"">WK</li><li style=""font-size:12pt;"">ZW</li>
</ul>
<br>
</br>
<b style=""font-size:22pt;"">Sekcja_Design:
</b>
<ul>
<li style=""font-size:12pt;"">NF</li>
</ul>
<br>
</br>
"
"29.1023.3","","Height","WeiB","","","","","","","","","","Kategoria_A","Podkategoria_A","","co tu?","Height","WeiB","","","","","<meta http-equiv=""content-type"" content=""application/xhtml+xml; charset=UTF-8""/>
<b style=""font-size:22pt;"">Überblick:
</b>
<br>
</br>
<table cellpadding=""10"" cellspacing=""10"" align=""left"" style=""font-size:12pt;table-layout:fixed;width:30%;"">
<tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Marke:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">JUSThome
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Serie:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">blabla
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Artikel-Nr.:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">29.1023.3
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Height:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">WeiB
</td>
</tr><tr>
<td width=""40%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Material:</td><td width=""60%"" border=""3"" style=""text-align:left;padding-left:20px;"">Material_B1
</td>
</tr>
</table><table cellpadding=""10"" cellspacing=""10"" align=""right"" style=""font-size:12pt;table-layout:fixed;width:70%;"">
<tr>
<td width=""20%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Abmessungen:</td><td width=""80%"" border=""3"" style=""text-align:left;padding-left:20px;""></td>
</tr><tr>
<td width=""20%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Höhe:</td><td width=""80%"" border=""3"" style=""text-align:left;padding-left:20px;"">1,00 cm
</td>
</tr><tr>
<td width=""20%"" border=""3"" style=""vertical-align:top;text-align:left;padding-left:20px;color:white;background-color: #b4b4b4"">Breite:</td><td width=""80%"" border=""3"" style=""text-align:left;padding-left:20px;"">2,00 cm
</td>
</tr>
</table><div style=""clear:both !important;"">
</div>
<br>
</br>
<b style=""font-size:22pt;"">Abmessungen im Detail:
</b>
<ul>
<li style=""font-size:12pt;"">Höhe: 1,00 cm</li><li style=""font-size:12pt;"">Breite: 2,00 cm</li>
</ul>
<ul>
<li style=""font-size:12pt;"">Kot : kott </li><li style=""font-size:12pt;"">Swinia : swiania </li>
</ul>
<br>
</br>
<b style=""font-size:22pt;"">Sekcja_A:
</b>
<ul>
<li style=""font-size:12pt;"">WK</li><li style=""font-size:12pt;"">ZW</li>
</ul>
<br>
</br>
<b style=""font-size:22pt;"">Sekcja_Design:
</b>
<ul>
<li style=""font-size:12pt;"">NF</li>
</ul>
<br>
</br>
"
这在excel中看起来如何。每个数据都正确放置,没有html部分:
当我在excel中打开它而没有任何修改(在text to columns选项之前)时,它就是这样的:
答案 0 :(得分:0)
由于这在技术上不是一个答案,我将把它作为对你的问题的评论。但是,我的声誉&#34;不足以评论。讽刺我可以回答问题,但不评论它们。无论如何......我在Macbook上复制并粘贴了你的例子并将其保存为CSV格式。它在Excel中打开很好。我有一种感觉,它与Mac与PC对待新线的方式有关。希望我能得到更多的帮助,但是因为它对我来说很好,所以我无法解决问题。
答案 1 :(得分:0)