String str1,str2,str3;
String[] inInvoiceLine= new String [36];
inInvoiceLine = Col1.split(",");
if (rowNum == 1)
{
outInvStartDt = inInvoiceLine[0];
outInvEndDt = inInvoiceLine[1];
}
else if (rowNum == 2)
{
for( int i = 0; i < inInvoiceLine.length - 1; i++)
{
names.add(inInvoiceLine[i].trim());}}
else if( rowNum >= 3 && rowNum <= 4)
{
for( int i = 0; i < inInvoiceLine.length - 1; i++)
{
str1=(inInvoiceLine[i].trim());
str2=names.get(i);
str3=str2.concat(str1);
names.set(i,str3);
}
}
else if( rowNum > 4 )
{
for( int i = 0; i < inInvoiceLine.length - 1; i++)
{
Invoice_Beg_Date=outInvStartDt ;
Invoice_End_date=outInvEndDt ;
switch (i)
{
case 0: outCarrier = inInvoiceLine[i].trim();
break;
case 1: outContract = inInvoiceLine[i].trim();
break;
case 2: outGroup = inInvoiceLine[i].trim();
break;
default: outName = names.get(i);
outValue = inInvoiceLine[i].trim();
generateRow(); the fixed columns.
break;
}
}
}
rowNum++;
大家好,我在java转换中遇到标题错误,来源是逗号分隔,第一行正在读取日期,第2,3和4行将连接字段并其余值请帮助。