CodePudding user response:
HTML is not an XML data structure, namely the string=& gt; XML=& gt; Excel, personal understanding,CodePudding user response:
With excell opened, regardless of the tip is excell like
String STR=
@ "& lt; Table>
& lt; tr> & lt; Td bgcolor=red> 1 row in the first column & lt;/td> & lt; Td bgcolor=yellow> The second column & lt;/td> & lt;/tr>
& lt; tr> & lt; Td> 2 rows in the first column & lt;/td> & lt; Td> The second column & lt;/td> & lt;/tr>
& lt;/table> ";
File. WriteAllText (@ "f: \ 111. XLS", STR, Encoding, UTF8);
CodePudding user response:
C # the background to create a datatable all your data load in the dtThen baidu export excel for c #