ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   save .csv file to .sdf file (https://www.excelbanter.com/excel-discussion-misc-queries/39442-save-csv-file-sdf-file.html)

deniseh

save .csv file to .sdf file
 
How am I able to save a .csv file to a .sdf file extension?

dlw

sdf is fixed field length. Open the .csv file in excel. highlight the
entire spreadsheet. Go Format / Column / Auto-fit section
That will make the columns, or fields, the right size. then do a File /
save as / and for the save as type:, pick formatted text (space delimited)
and put a .sdf at the end of the file name.

"deniseh" wrote:

How am I able to save a .csv file to a .sdf file extension?


deniseh

Thanks for this, your instructions worked very well, unfortunately what I am
trying to do with the data doesn't work, so I'm still stuck!! If I expalin a
little more it may be easier to help me (I hope) Our accounts package is
able to export data in .csv or .dbf format, I have to get data in fixed
length fields (which are stipulated) to another software package which
accepts data in .sdf format. Everywhich way I try I cannot get the data
across, it's driving me nuts. Anyway thanks for your initial help, it is
appreciated.

"dlw" wrote:

sdf is fixed field length. Open the .csv file in excel. highlight the
entire spreadsheet. Go Format / Column / Auto-fit section
That will make the columns, or fields, the right size. then do a File /
save as / and for the save as type:, pick formatted text (space delimited)
and put a .sdf at the end of the file name.

"deniseh" wrote:

How am I able to save a .csv file to a .sdf file extension?


Dave Peterson

I don't know what a .sdf file is, but this might help you create a file with
fixed length fields.

I'd either concatenate the cell values into another column:

=LEFT(A1&REPT(" ",5),5) & LEFT(B1&REPT(" ",4),4) & TEXT(C1,"000,000.00")

(You'll have to modify it to match what you want.)

Then I'd copy and paste to notepad and save from there. Once I figured out that
ugly formula, I kept it and just unhide that column when I wanted to export the
data.

If that doesn't work for you, maybe you could do it with a macro.

Here's a link that provides a macro:
http://google.com/groups?threadm=015...0a% 40phx.gbl

=========

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

deniseh wrote:

Thanks for this, your instructions worked very well, unfortunately what I am
trying to do with the data doesn't work, so I'm still stuck!! If I expalin a
little more it may be easier to help me (I hope) Our accounts package is
able to export data in .csv or .dbf format, I have to get data in fixed
length fields (which are stipulated) to another software package which
accepts data in .sdf format. Everywhich way I try I cannot get the data
across, it's driving me nuts. Anyway thanks for your initial help, it is
appreciated.

"dlw" wrote:

sdf is fixed field length. Open the .csv file in excel. highlight the
entire spreadsheet. Go Format / Column / Auto-fit section
That will make the columns, or fields, the right size. then do a File /
save as / and for the save as type:, pick formatted text (space delimited)
and put a .sdf at the end of the file name.

"deniseh" wrote:

How am I able to save a .csv file to a .sdf file extension?


--

Dave Peterson


All times are GMT +1. The time now is 01:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com