Question:
How to convert Excel file to text file so it can be read by Fortran?
AA
2011-08-11 17:17:34 UTC
How to convert Excel file to text file so it can be read by Fortran?

For save as "txt" option in Excel 2007, I got a file with one tab but with a big space (the data in lines with a big space) so the program is not able to read it.


I would really appreciate your help!

AB
Four answers:
Eliot K
2011-08-11 17:25:03 UTC
Assume that you have 10 columns of data

Assume that you need a delimiting character, say a tab, comma, asterisk, or some ASCII character



Steps for making text file with delimiter of * between columns:



1) Insert blank Column A (now data is in columns B through K)



2) Type formula as follows:

= B1 & "*" & C1 & "*" & D1 & "*" & E1 & "*" & F1 [ and so on through K1



3) Copy this formula into as many rows in Column A as you need.



4) Copy Column A [ select column A, then Copy]



5) Paste into TEXT File
Vincent G
2011-08-11 18:53:34 UTC
Specify the Excel output format to be comma separated values (CSV) -- 'text & commas'.



Note that unless you did not write the Fortran program, you do have input format control capability, so virtually anything Excel could put out, the Fortran program could be configured to read properly.
Ragavendra
2014-05-09 08:28:12 UTC
Here is a tool to convert Excel to Text file



http://xlvba.net/XLCSV110002.php
dewulf
2016-10-18 10:52:39 UTC
Scottakrohn already spoke back the question, besides those are greater information: There are 2 circumstances: (a)- Import textual content record to Excel to a clean workbook. (b)- Import textual content record to contemporary workbook that could contain different documents. here steps are as according to "Excel 2003" and can get replaced in accordance to the version, however the muse is the comparable: In case (a): one million- Open Microsoft Excel. 2- From "record" menu click "Open...", the Open communique container will look. 3- on the backside of the communique container, in "documents of type:" container choose for "textual content documents (*.prn; *.txt; *.csv)" 4- In "look in:" container specify the region of the textual content record, and then double click it, the "textual content Import Wizard" will look. 5- in the wizard (Step one million of three), choose for "Delimited", (The "fastened width" option is rarely used, use it given which you particularly opt to split your textual content to fastened length columns). 6- in the "start up import at row:" specify the 1st row of the information you opt to import. 7- in the "record beginning:" container, choose for the format of the textual content record. 8- click "next", then in (Step 2 of three), specify the delimiter which would be used to split each and each line of the textual content record to columns (in case you do no longer opt to split the lines into columns uncheck all the innovations, and in case you opt to specify the character by ability of your self choose for "different" and specify the character). 9- click "next", then in (Step 3 of three) click the "stepped forward" button, specify the decimal and 1000's separators to correctly known the numeric documents on your textual content record (yet be conscious that when the uploading technique the separators would be switched over to verify those in the administration panel (community Settings). 10- click "ok" 11- you additionally can choose for the format of the Excel columns (choose each and each column, then below "Column documents format" click the needed format for column. To exclude a column of documents once you import the textual content record, choose the column below documents preview, and choose "do no longer import column (pass)". 12- click "end". In case (b): one million- click the cellular the place you opt to place the information from the textual content record. 2- From the "documents" menu click "Import exterior documents" then "Import documents..." 3- observe the stairs in case (a) from 4 to twelve.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...