請幫我分割數據。使用c分割存在於不同行中的數據#
林有我的excel文件的一些數據作爲
123456 // row id 0,0
234567 // row id 1,0
345678 // row id 2,0
456789 // row id 3,0
等等...
現在我在windows應用程序的文本框中提供這些數據,需要的輸出數據作爲split[0] = 123456,split[1]=234567
和等等...
請幫我這...
string text = textBox1.Text;
string[] split = text.Split();//Here what condition should i give???
int count = split.Length;
for (int i = 0; i < count; i++)
{
Console.WriteLine(split[i]);
}
我不清楚你的實際文件是什麼樣子的,//是否是定界符?比使用這個你的'分裂'。是','?在使用循環之前,您可以拆分從分割中獲得的每個字符串。 – HimBromBeere
認爲它不是行ID,它是單元ID,所以我們有一個包含5個值的列。 –