Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running excel and would like to export my file as a .scsv (semi-colon separated values) sheet instead of a .csv. Is there any way to do this?

ps. I can't do a .csv and search and replace commas with semi-colons because the fields contain commas already.

share|improve this question
    
If you're open to doing a little programming, a converter could be written fairly easily in the Python programming language using its built-in csv module which would make it easy to read Excel .csv files and then write new versions of them that had just about any delimiter your desired. –  martineau Sep 17 '12 at 21:38
add comment

3 Answers

up vote 4 down vote accepted

How about doing Tab Delimited and replacing the tabs with semi-colons?

In excel: File -> Save As -> in Format select "Tab Delimited Text (.txt)" then his save.

Open the file in notepad and open the replace window. Since you can't tab directly into this window, copy a tab from your document and then paste it into the Find box and put your ; into the replace box. Then replace all.

I assume this would work because it is very rare to have tabs within an excel document.

share|improve this answer
    
Although basic for most users, could you provide a set of instructions as well? –  Canadian Luke Sep 17 '12 at 21:06
    
Can that be done entirely within Excel and if so, how? –  martineau Sep 17 '12 at 21:22
    
I don't think it can be done entirely in Excel. Excel hides the formating (tabs) so you wouldn't be able to replace them. After replacing them with semi-colons you wouldn't be able to open with excel either (it'd just be one giant cell) –  Robert Sep 17 '12 at 23:01
add comment

I don't think you can set output separator directly in Excel, but (assuming Windows) you could change OS list separator to ; - that's done in Regional Settings->Customize. Excel will use that setting outputing your csv files.

share|improve this answer
1  
Important note: if you do this, all Windows programs that use the Internationalized Windows libraries will assume that ; is the separator character for all CSV files. If this is a one time solution, it probably makes more sense to save a regular CSV file and use an editor to change the commas to semicolons –  Isaac Rabinovitch Sep 18 '12 at 3:04
add comment

If you would like a script, paste the following in a module.

    Option Explicit
    Sub export2scsv()
    Dim lastColumn As Integer
    Dim lastRow As Integer
    Dim strString As String
    Dim i As Integer, j As intger
    lastColumn = ActiveSheet.UsedRange.Column - 1 + ActiveSheet.UsedRange.Columns.Count
    lastRow = ActiveSheet.UsedRange.Rows(ActiveSheet.UsedRange.Rows.Count).Row
    Open "output.scsv" For Output As #1
    For i = 1 To lastRow
    Cells(i, 1).Select
    strString = ""
    For j = 1 To lastColumn
    If j <> lastColumn Then
    strString = strString & Cells(i, j).Value & ";"
    Else
    strString = strString & Cells(i, j).Value
    End If
    Next j
    Print #1, strString
    Next i
    Close #1
    End Sub
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.