[英]How can i merge binary excel cell created by C#?
我使用此代碼通過C#創建一個Excel單元格。
/// <summary>
/// Writes the text cell value.
/// </summary>
/// <param name="row">The row.</param>
/// <param name="col">The col.</param>
/// <param name="value">The string value.</param>
public void WriteCell(int row, int col, string value)
{
ushort[] clData = { 0x0204, 0, 0, 0, 0, 0 };
int iLen = value.Length;
byte[] plainText = Encoding.UTF8.GetBytes(value);
clData[1] = (ushort)(8 + iLen);
clData[2] = (ushort)row;
clData[3] = (ushort)col;
clData[5] = (ushort)iLen;
WriteUshortArray(clData);
writer.Write(plainText);
}
添加合並的單元格需要進行哪些更改?
這是Microsoft的視頻, 我如何使用LINQ to XML創建Excel電子表格?
除了以專有格式編寫excel文件外,還有其他方法,例如: http : //epplus.codeplex.com/ ?
我不建議使用Microsoft Excel BIFF格式。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.