Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Excel - CSV Format and column width
I am using CSV format in Excel and need to be able to define different column widths. Is there no way to do this ? If there isnt a way, is there any other text file format I can use to store this information in ? Kevin. |
#2
|
|||
|
|||
Comma separated values files usually contain fields that vary in length (between
records). The comma is the delimited that tells the program reading the file what goes in each field. If you want fixed width fields (like for a mainframe application????), you may be able to just adjust the columnwidths and do File|saveAs (and choose "formatted text (space delimited) (*.prn)" in the "save as type". Saving a .csv file with fixed length fields seems kind of unusual to me. wrote: I am using CSV format in Excel and need to be able to define different column widths. Is there no way to do this ? If there isnt a way, is there any other text file format I can use to store this information in ? Kevin. -- Dave Peterson |
#3
|
|||
|
|||
CSV file - Thats just what I thought, but its not the way Excel treats it. No matter where the comma is placed, all the columns are of equal length. Dave Peterson wrote: Comma separated values files usually contain fields that vary in length (between records). The comma is the delimited that tells the program reading the file what goes in each field. If you want fixed width fields (like for a mainframe application????), you may be able to just adjust the columnwidths and do File|saveAs (and choose "formatted text (space delimited) (*.prn)" in the "save as type". Saving a .csv file with fixed length fields seems kind of unusual to me. |
#5
|
|||
|
|||
Thats correct DAve. In Excel its always the same length but in Notepad
it shows just fine. Dave Peterson wrote: Is the data in each record (for the same field) always the same length? If you open the .csv file using Notepad, does it look ok there? wrote: CSV file - Thats just what I thought, but its not the way Excel treats it. No matter where the comma is placed, all the columns are of equal length. |
#6
|
|||
|
|||
So maybe just widening the columns after you open the .csv file in excel would
be sufficient? wrote: Thats correct DAve. In Excel its always the same length but in Notepad it shows just fine. Dave Peterson wrote: Is the data in each record (for the same field) always the same length? If you open the .csv file using Notepad, does it look ok there? wrote: CSV file - Thats just what I thought, but its not the way Excel treats it. No matter where the comma is placed, all the columns are of equal length. -- Dave Peterson |
#7
|
|||
|
|||
Definitely - my whole point of performing this exercise is to automating sending a report - which is currently manual - via a CSV file. If I have to re-format the file and send it to everyone, it defeats the main purpose of this exercise. Thanks for all your help. Kevin. Dave Peterson wrote: So maybe just widening the columns after you open the .csv file in excel would be sufficient? |
#8
|
|||
|
|||
You may want to share the file as a .txt file.
And give them a workbook that contains a macro that imports that .txt file. You could add headers/filters/page layout/pivottables/charts and graphs and other stuff. Send out the .txt file whenever you want. But include instructions to open the workbook that contains the macro and run that macro to import the data. If you add enough nice stuff to the macro (not just formatting), the end users may even like it better. wrote: Definitely - my whole point of performing this exercise is to automating sending a report - which is currently manual - via a CSV file. If I have to re-format the file and send it to everyone, it defeats the main purpose of this exercise. Thanks for all your help. Kevin. Dave Peterson wrote: So maybe just widening the columns after you open the .csv file in excel would be sufficient? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Format Excel column to notify with a reminder | Excel Worksheet Functions | |||
Format Excel column to notify with a reminder? | Excel Discussion (Misc queries) | |||
How to Format Excel Sheet ToShowRowNumbers but not the column alph | Excel Discussion (Misc queries) | |||
Column format when merging Excel data to Word labels | Excel Discussion (Misc queries) | |||
Excel's column width format box | New Users to Excel |