Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
If you need 15 char long values in CSV, you can add SPACEs as FILLER to your EXCEL Cell Value, then save it as CSV.
Unfortunately you have to loop through each row to make the changes. High level logic is like :- For Each MyRow as ExcelRow in MySheet.Rows MyRow(Col).Value &= " " 'u put 15 spaces MyRow(Col).Value = MyRow(Col).Value.substring(0, 15) Next The above code will give you LEFT JUSTIFIED 15 char long CSV Field. If you want RIGHT JUSTIFIED Text in CSV, then CODE will be like (for the filler only) MyRow(Col).Value = MyRow(Col).Value.Reverse() MyRow(Col).Value &= " " MyRow(Col).Value = MyRow(Col).Value.substring(0, 15) MyRow(Col).Value = MyRow(Col).Value.Reverse() Looping and string operation will take toll on performance - depending on how many rows you have and computer's power. Thnaks you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lock Cell Format - Allow copy and paste of data without format change | Excel Worksheet Functions | |||
Can cell format come from and change with reference cell format | Excel Discussion (Misc queries) | |||
how do i format a cell based on format of a range of cells? | Excel Discussion (Misc queries) | |||
How do I copy data in single cell format to a merged cell format | Excel Discussion (Misc queries) |