C# Aspose单元格-保留CSV中的前导零

C# Aspose单元格-保留CSV中的前导零,c#,aspose-cells,C#,Aspose Cells,我使用Aspose单元格生成一个非常简单的报告。问题是我有几个字段有前导零。在CSV中打开时,我看不到前导零。如果我看文本,我可以看到零 你知道如何保持前导零吗 谢谢。我觉得这不是一个完美的解决方案,但我能够得到我想要的结果。基本上是用string.Format(“=\”{0}\”,content.account\u no)格式化列;但我不得不在这一排人中相互配合 int curretCol = System.Array.FindIndex<string>(clmAry, (stri

我使用Aspose单元格生成一个非常简单的报告。问题是我有几个字段有前导零。在CSV中打开时,我看不到前导零。如果我看文本,我可以看到零

你知道如何保持前导零吗


谢谢。

我觉得这不是一个完美的解决方案,但我能够得到我想要的结果。基本上是用string.Format(“=\”{0}\”,content.account\u no)格式化列;但我不得不在这一排人中相互配合

int curretCol = System.Array.FindIndex<string>(clmAry, (string r) => r.ToString() == "account_no");
                int currentrow = 1;

                foreach (GLSearchDC content in GLList)
                {
                    Cell cell = worksheet.Cells[CellsHelper.CellIndexToName(currentrow++, curretCol)];

                        cell.PutValue(string.Format("=\"{0}\"", content.Account_No));
                    content.account_no));
                }
int curretCol=System.Array.FindIndex(clmAry,(string r)=>r.ToString();
int currentrow=1;
foreach(GLList中的GLSearchDC内容)
{
Cell Cell=worksheet.Cells[CellsHelper.CellIndexToName(currentrow++,curretCol)];
cell.PutValue(string.Format(“=\”{0}\”,content.Account\u No));
内容、账号);
}

我觉得这不是一个完美的解决方案,但我能够得到我想要的结果。基本上是用string.Format(“=\”{0}\”,content.account\u no)格式化列;但我不得不在这一排人中相互配合

int curretCol = System.Array.FindIndex<string>(clmAry, (string r) => r.ToString() == "account_no");
                int currentrow = 1;

                foreach (GLSearchDC content in GLList)
                {
                    Cell cell = worksheet.Cells[CellsHelper.CellIndexToName(currentrow++, curretCol)];

                        cell.PutValue(string.Format("=\"{0}\"", content.Account_No));
                    content.account_no));
                }
int curretCol=System.Array.FindIndex(clmAry,(string r)=>r.ToString();
int currentrow=1;
foreach(GLList中的GLSearchDC内容)
{
Cell Cell=worksheet.Cells[CellsHelper.CellIndexToName(currentrow++,curretCol)];
cell.PutValue(string.Format(“=\”{0}\”,content.Account\u No));
内容、账号);
}

是的,您的解决方案也很好,可以达到目的。致以最良好的问候,沙克尔。是的,你的解决方案也很好,达到了目的。向你问好,沙克尔。