<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Read Input file from working directorly in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Read-Input-file-from-working-directorly/m-p/958962#M21409</link>
    <description>I'm working with a program which use Excel spreadsheet to take input data and write to an input file, then use a Fortran Console application to read that input file, perform some calculation and then write to several output files.  The question is the location of the input file created by Excel may very.  how could the Fortran Consonle application  know where to find it.  Is there anyway I could pass an argument or commnd line from Excel to Fortran exe.</description>
    <pubDate>Wed, 18 Jul 2001 07:04:29 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2001-07-18T07:04:29Z</dc:date>
    <item>
      <title>Read Input file from working directorly</title>
      <link>https://community.intel.com/t5/Software-Archive/Read-Input-file-from-working-directorly/m-p/958962#M21409</link>
      <description>I'm working with a program which use Excel spreadsheet to take input data and write to an input file, then use a Fortran Console application to read that input file, perform some calculation and then write to several output files.  The question is the location of the input file created by Excel may very.  how could the Fortran Consonle application  know where to find it.  Is there anyway I could pass an argument or commnd line from Excel to Fortran exe.</description>
      <pubDate>Wed, 18 Jul 2001 07:04:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Read-Input-file-from-working-directorly/m-p/958962#M21409</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-07-18T07:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Read Input file from working directorly</title>
      <link>https://community.intel.com/t5/Software-Archive/Read-Input-file-from-working-directorly/m-p/958963#M21410</link>
      <description>Sure, see NARGS/GETARG: &lt;BR /&gt; &lt;BR /&gt;&lt;PRE&gt;&lt;FONT size="+0"&gt; 
PROGRAM Foo 
 
USE DFLIB 
 
CHARACTER (MAX_PATH)::     sDir="" 
 
IF (NARGS() .GT. 0) CALL GETARG(1, sDir) 
&lt;/FONT&gt;&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;and change all your open statements so that they look like: &lt;BR /&gt; &lt;BR /&gt;&lt;PRE&gt;&lt;FONT size="+0"&gt; 
OPEN (11, FILE=TRIM(sDir)//"input.txt") 
&lt;/FONT&gt;&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Wed, 18 Jul 2001 18:12:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Read-Input-file-from-working-directorly/m-p/958963#M21410</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-07-18T18:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Read Input file from working directorly</title>
      <link>https://community.intel.com/t5/Software-Archive/Read-Input-file-from-working-directorly/m-p/958964#M21411</link>
      <description>You can also consider writing an Excel VBA macro to pass an argument directly to a Fortran DLL. You can probably change your console application to a DLL by changing its main program to a subroutine. If you do, though, the Fortran code shouldn't write any output to the console. The console won't exist unless the DLL explicitly creates it. Writing to and reading from files is OK. &lt;BR /&gt; &lt;BR /&gt;Mike</description>
      <pubDate>Wed, 18 Jul 2001 20:52:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Read-Input-file-from-working-directorly/m-p/958964#M21411</guid>
      <dc:creator>durisinm</dc:creator>
      <dc:date>2001-07-18T20:52:18Z</dc:date>
    </item>
  </channel>
</rss>

