操作excel的记忆1
来源:互联网 发布:陕师大网络portal界面 编辑:程序博客网 时间:2024/06/07 05:14
private void button1_Click(object sender, EventArgs e)
{
string s = "";
int i=1;
do
{
System.Array array = this.Range["a" + i.ToString(), "q" + i.ToString()].Cells.Value2 as System.Array;
string[] arr2 = this.ConvertToStringArray(array);
if (arr2.Any<string>(p => !string.IsNullOrEmpty(p)))
{
s += arr2[0];
i++;
}
else
{
break;
}
} while (true);
this.textBox1.Text = s;
}
private string[] ConvertToStringArray(System.Array values)
{
// create a new string array
string[] theArray = new string[values.Length];
// loop through the 2-D System.Array and populate the 1-D String Array
for (int i = 1; i <= values.Length; i++)
{
if (values.GetValue(1, i) == null)
theArray[i - 1] = "";
else
theArray[i - 1] = (string)values.GetValue(1, i).ToString();
}
return theArray;
}
- 操作excel的记忆1
- DOM的基础操作记忆
- excel的操作(生成Excel)
- 流读写操作的记忆方法
- 對excel的操作
- Excel的导出操作
- Excel的导出操作
- Excel操作的总结
- ruby的Excel操作
- 操作EXCEL的方法
- 操作Excel的例子
- Excel表的操作
- excel的读写操作
- excel的读操作
- python的excel操作
- EXCEL的一些操作
- python的excel操作
- Excel 的基本操作
- 深入浅出单实例Singleton设计模式
- API入门系列之五 -一个正儿八经的SDK程序
- 在VC6中安装BOOST的正则表达式库
- hiiiiii everyone
- ASP.NET MVC Framework 系列
- 操作excel的记忆1
- 必备的 Java 参考资源列表
- 用C语言读取大文件的问题 内存映射
- TClientDataSet的使用
- 在FlowPortal.net中实现-请假流程审批通过后自动设定外出
- JAVA操作XML二(转换关系):String --document--xml --document--String
- 查找串口
- 刚我流泪了
- MySQL数据库的导入和导出