Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
embed alignment in csv file
Does anyone know if there is a way to embed the alignment in a csv file so
that it aligns correctly when I open it in excel? For instance If I create a csv file with '""01234""' the column will open as an text field. I was hoping to do something like the same with aligning left or right. THank you, |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
embed alignment in csv file
A CSV file only contains data, no formatting information. Excel will use the
general format for each column (texts are aligned left, numbers are aligned right). What you could do is to have the first row of your file with the alignment you need for each column, then run a short macro that would perform alignment according to the instructions. Sub AlignColumns() ' Align columns according to the text ' "left", "right", "center" in the first row Dim i As Long For i = 1 To 255 Select Case LCase(Cells(1, i)) Case "left" Columns(i).HorizontalAlignment = xlLeft Case "right" Columns(i).HorizontalAlignment = xlRight Case "center" Columns(i).HorizontalAlignment = xlCenter End Select Next i End Sub |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
embed alignment in csv file
No.
It is not possible. Challa Prabhu "Abbey Normal" wrote: Does anyone know if there is a way to embed the alignment in a csv file so that it aligns correctly when I open it in excel? For instance If I create a csv file with '""01234""' the column will open as an text field. I was hoping to do something like the same with aligning left or right. THank you, |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
embed alignment in csv file
ok, thanks for the reply.
"challa prabhu" wrote: No. It is not possible. Challa Prabhu "Abbey Normal" wrote: Does anyone know if there is a way to embed the alignment in a csv file so that it aligns correctly when I open it in excel? For instance If I create a csv file with '""01234""' the column will open as an text field. I was hoping to do something like the same with aligning left or right. THank you, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I embed an email in an excel file? | Excel Discussion (Misc queries) | |||
is it possible to embed a font in an excel file? | Excel Discussion (Misc queries) | |||
how do i embed a file in a workbook | Excel Discussion (Misc queries) | |||
How do I convert excel file into ASCII text file with alignment? | Excel Discussion (Misc queries) | |||
How do I embed a PDF file within Excel | Excel Discussion (Misc queries) |