Results 1 to 6 of 6

Thread: Need help to import a Microsoft Excel file to semicolon delimited text file

  1. #1
    Join Date
    Jan 2012
    Posts
    21

    Need help to import a Microsoft Excel file to semicolon delimited text file

    Hello all. We have the need to export a file from excel to a semicolon delimited text file. Is there a way to do this from Excel directly? If not, does anyone have any other suggestions? TIA for your help.

  2. #2
    Join Date
    Nov 2010
    Posts
    422

    Re: Need help to import a Microsoft Excel file to semicolon delimited text file

    If you change your regional settings to use the semicolon as your list separator, you can save as .csv and it should work. But this may affect other programs, too--since it's a windows setting. Click on Start button > Settings > Control panel > Rregional and language options > Regional options tab > Customize button near the bottom. On the other hand, if you don't want to fiddle with that setting, you could use a macro to write your file.

  3. #3
    Join Date
    Nov 2010
    Posts
    503

    Re: Need help to import a Microsoft Excel file to semicolon delimited text file

    Export as a csv file. Open file in Notepad and replace commas with semi-colons. Works fine unless you have commas in your cells. A problem with this approach is that if semicolons are the delimiter, then the field should have quote marks around it if a semicolon appears in the data. The program writing the file needs to put the delimiters in, so it knows when to add the quote marks. Otherwise, the program reading the file can get messed up if semicolons are in the data.

  4. #4
    Join Date
    Aug 2011
    Posts
    695

    Re: Need help to import a Microsoft Excel file to semicolon delimited text file

    The code must be in a general module of your file:
    • Alt + F11 to open the VBA Editor
    • Ctrl + R to open Project Explorer and select
    • Select the desired file by double
    • Alt + E and then M
    • In the right pane is now an empty module was inserted
    • In this module, the code must be inserted
    • In the Project Explorer, the module is displayed under the file
    • Save and close the VBA editor with Alt + F4
    • The macro or the function you in this file is now available
    • Adjustments you have to make really only here:
    • ": \ \ Test C" Const path As String =
    • Const filename As String = "test"

    Currently the file in the directory will be saved to C: \ test \ under the name test.csv. That you had to adapt to your circumstances.

  5. #5
    Join Date
    Mar 2011
    Posts
    542

    Re: Need help to import a Microsoft Excel file to semicolon delimited text file

    I have just tested the code again. For me, after running the macro (Alt-F8) in the c: \ test creates a file test.csv. This file contains the contents of the current worksheet is separated by a semicolon. I once attached a sample file. Could you try it again so that (Please make sure that the directory c: \ test there as well).

  6. #6
    Join Date
    May 2011
    Posts
    523

    Re: Need help to import a Microsoft Excel file to semicolon delimited text file

    To export data from Excel to a text file you can do so without macros and say that they are tabulated need however if you want who are Sepra comma must first save the Excel file as CSV (comma-limiting) this process is on file and save as file type looking csv (comma-limiting), and give it another name if you have more leaves and leave deliminators containing the information and record again after you close that file to the directory where you record you press the right click and say open with notepad there you are with a semicolon and also respecting the tabulation if you want a semicolon does not do anything and leave it if you want any punctuation edition gives you replace type in the semicolon and then give him replace all or if you prefer to change the comma semicolon at the same table will appear (replacing edition) type the semicolon sign where the sign says replace and eat where says and then replace it. and then recorded it with another name and text.

Similar Threads

  1. Importing a text file in vba in Microsoft Excel
    By Kaesav in forum MS Office Support
    Replies: 4
    Last Post: 24-01-2012, 05:16 PM
  2. How to import a .xps file in Microsoft Excel 2007
    By The-Farmer in forum MS Office Support
    Replies: 2
    Last Post: 17-01-2012, 01:24 PM
  3. Import a text file in JTextPane
    By Ash maker in forum Software Development
    Replies: 5
    Last Post: 22-01-2010, 11:17 AM
  4. Import excel file and print
    By skylabnn in forum Software Development
    Replies: 11
    Last Post: 04-07-2009, 08:04 PM
  5. import text file into ms access
    By Clay Aiken in forum Windows Software
    Replies: 2
    Last Post: 23-06-2009, 08:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,577,247.16511 seconds with 17 queries