C#
Excel
--------------------编程问答--------------------
这不是来请教问题的,整个就是来找免费苦力的。
--------------------编程问答--------------------
呵呵,不好意思,我把目前自己能做的先贴出来:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.IO;
using System.Collections;
using System.Text.RegularExpressions;
namespace change
{
public partial class txtTOexcel : Form
{
static FileInfo[] files;
static DirectoryInfo folder;
static String Url;
public txtTOexcel()
{
InitializeComponent();
textBox.Text = @"F:\C#\test";
}
谢谢版大,不过我读取txt的时候是按行读的,读出后存放在conten中,想实现的就是:将conten中的标题和值分割,标题写入第一列,值写入第二列
--------------------编程问答--------------------
找到了如下方法:
string[] a = System.Text.RegularExpressions.Regex.Split(conten1, " ");
ArrayList list = new ArrayList();
for (int i = 0; i < buf1.Length; i++)
{
list.Add(a[i]);
textBox2.Text = a[1].Trim();
}
分割后a[0]是标题,a[1]是值,可是为何又不能写入到excel中了,郁闷啦
--------------------编程问答--------------------
找到了如下方法:
string[] a = System.Text.RegularExpressions.Regex.Split(conten1, " ");
ArrayList list = new ArrayList();
for (int i = 0; i < buf1.Length; i++)
{
list.Add(a[i]);
textBox2.Text = a[1].Trim();
}
分割后a[0]是标题,a[1]是值,可是为何又不能写入到excel中了,郁闷啦