April 16

Sometimes we as programmers have been plagued with the Microsoft Office package is confronted. Often it is then further processed Excel lists. The easiest way is to convert it to CSV files. Were it not for the line breaks within the cells that prevent that you get one record per line.

So they must be replaced prior to the Excel file. But no matter how easily it is just not possible. Remedy a small macro

  A
 2
 3
 4
 5
 6
 7
 8
 9
 10
 Dim z As Range For Each z In Selection z.Value = Replace(z.Value, Chr(10), "," ) Next Application.ScreenUpdating = True End Sub Sub ersetze_cr_mit_komma () Application.ScreenUpdating = False Dim z As Range For Each z In Selection z.Value = Replace (z.Value, Chr (10), "") Next Application.ScreenUpdating = True End Sub 

Before running the area must (not entire rows or columns), to be replaced in the. Done :-)

Who wants to handle without going CSV Excel files should be looking into the Java library POI watch.

gklinkmann written by \ \ tags:

Add a comment

Yes, I would like to be notified about comments!