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

>> Wednesday 13 June 2012

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.
Reply With Quote
#2
Old 13-01-2012
Alfons Alfons is offline
Member

Join Date: Nov 2010
Posts: 410
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.
Reply With Quote
#3
Old 13-01-2012
Gania Gania is offline
Member

Join Date: Nov 2010
Posts: 480
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.
Reply With Quote
#4
Old 13-01-2012
Shurod Shurod is offline
Member

Join Date: Aug 2011
Posts: 599
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.
Reply With Quote
#5
Old 13-01-2012
Erakna Erakna is offline
Member

Join Date: Mar 2011
Posts: 507
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).
Reply With Quote
#6
Old 13-01-2012
Bontu Bontu is offline
Member

Join Date: May 2011
Posts: 500
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.
Reply With Quote

0 comments:

Post a Comment

Read - Share - Comment

About This Blog

Share and Save

About Author