Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > File Transfer
  New Posts New Posts RSS Feed - file import with browse
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum Lockedfile import with browse

 Post Reply Post Reply
Author
Message
mikehmc View Drop Down
Groupie
Groupie


Joined: June 17 2004
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote mikehmc Quote  Post ReplyReply Direct Link To This Post Topic: file import with browse
    Posted: June 27 2014 at 11:42am
I would like to use the Accuterm tools to import an excel file from windows. we have a green screen app in D3 9.xx

The program FTIMPORT works great. But it required either a hard coded set of parameters, or green screen inputs by the user for directory and filename.

I would like it to call the source file browse window used by TOOLS_IMPORT in the task bar so the user can use a window to graphically browse to the source file being loaded.

Many of our process use Kermit to load a file, then use the TOOLS_IMPORT to select the file. But this wont work with an Excel file unless it is saved as a text file.

Any ideas how to initiate a file load of an excel file but use the TOOLS_IMPORT window so there is a graphic browser to a source file?
Back to Top
Shrek59 View Drop Down
Senior Member
Senior Member


Joined: December 04 2006
Location: New Zealand
Status: Offline
Points: 208
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shrek59 Quote  Post ReplyReply Direct Link To This Post Posted: June 28 2014 at 11:11am
How you approach this depends a lot on where the Excel file is ... is it on the client or on the server? I am assuming here that you need the data in text format, but that isn't quite clear from your post.

If it is on the client, you could run a script from AccuTerm that will open Excel, save your data as text (at some location accessible to the server), exit from Excel, and then finally your mv programs could do the import. (For an example of this type of scripting, see "Getting Started in OpenQM - Part 2" available from www.rushflat.co.nz - around page 150).

If the Excel file is on the server, use PHPExcel to convert the Excel spreadsheet to CSV format, and then do the import.

I haven't used TOOLS_IMPORT but I guess that is a client side browse. For a server side browse, I use a program to generate the directory listing, then pass that to a scripted list box (see the AT samples folders for an example) for the user to choose a file.

I hope this gives you some ideas.

Cheers,

Brian
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: July 01 2014 at 3:29am
Hi Mike -

You could use a simple script to display the standard Windows file dialog, to let the user choose the file before calling FTIMPORT. Here's an example:
SCRIPT = 'InitSession.Output OpenFileName("Open Excel File","excel files:*.xls,*.xlsx;all files:*.*") & vbCr'

PRINT ESC : STX : 'P' : SCRIPT : CR :
INPUT EXCEL.FILE.NAME

Thanks,

Pete
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.