开发者

Excel - creating csv file

I want to enter the data manually in a excel file and generate the below CSV File format. Problem is I entered the data in 11 rows(Excel). First row has 10 columns. Second 开发者_StackOverflow社区row has 15 columns. Last row has 4 columns. Some columns can have empty data also. When i save the file as csv file first line and last line has 15 columns. How can i generated the csv file. what i need to do to include the empty columns in the csv file

H,TEST_w99999999999_f101203001,03/12/2010,02:45:28,MIS,MISC,MIS,NEW,, D,,0027940622,,,MISC,030100059566901-000000452312108,MIS,03/12/2010,,,1,57.25,, D,,0027940622,,,MISC,030100059566901-000000452312109,MIS,03/12/2010,,,1,56.00,, D,,2000003318,,,MISC,030200059566901-000000452308586,MIS,03/12/2010,,,1,0.92,, D,,2000004473,,,MISC,030300059566901-000000452176305,MIS,03/12/2010,,,1,-0.45,, D,,2000004439,,,MISC,030300059566901-000000452243016,MIS,03/12/2010,,,1,-38.28,, D,,2000003460,,,MISC,030300059566901-000000452251974,MIS,03/12/2010,,,1,-267.77,, D,,2000006846,,,MISC,030300059566901-000000452300634,MIS,03/12/2010,,,1,-0.05,, D,,2000006846,,,MISC,030300059566901-000000452300636,MIS,03/12/2010,,,1,0.05,, D,,2000004059,,,MISC,030300059576013-000000452317628,MIS,03/12/2010,,,1,272.50,, T,TEST_w99999999999_f101203001,9,80.17


   Sub SaveAsCSV()
      ActiveWorkbook.SaveAs Filename:= _
          "C:\NewCsvDile.csv", FileFormat:=xlCSV, _
           CreateBackup:=False
   End Sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜