C#導出Excel時,設置列爲數字類型

只需要在PutValue時,轉爲數字類型即可。導出時,在Excel會自動顯示爲數字。默認是文本。 for (int i = 0; i < dt.Rows.Count; i++)                 {                     for (int j = 0; j < dt.Columns.Count; j++)                     {        
相關文章
相關標籤/搜索