Topic Options
#27955 - 07/12/11 08:25 AM Exporting to CSV through Command Line - Grid View
GeorgeandLaura Offline
Adagio Scholar

Registered: 08/09/10
Posts: 92
Loc: LaSalle Ontario
Hi There,
I am currently using Command Line Parameters to export a view to Excel without any intervention and will be invoking this through VBA. I have three questions.
1. Does anyone know of a way to suppress the splash screen for Gridview so that it runs totally in the background?
and
2. Does anyone know of a way to export to .CSV through command lines instead of Excel?
3. Or at least to close Excel when it is done exporting - it leaves Excel open each time? (We can do this with programming but thought I'd ask)
Everything else is working perfectly and we can work around these issues, but it would be nice to have this all working perfectly.
Thanks for any input!

Top
#27957 - 07/12/11 09:08 AM Re: Exporting to CSV through Command Line - Grid View [Re: GeorgeandLaura]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
There is an INI setting that will send the ExcelDirect output directly to a CSV file. Details are in the ReadMe Help file with most applications. This is from the BankRec release note:
Quote:

Excel Direct (from finders, smart finders and from grids in some modules) can be configured to export an ASCII CSV file (instead of sending data direct to Excel) and start an application that automatically opens the file. This allows export when Excel is not installed and provides support for other spreadsheets such as OpenOffice.org. Note that unlike Excel Direct there is no formatting with CSV. To enable this functionality, entries must be made manually in the file \softrak\system\ssi2xl.ini. Refer to the Configuring Excel Direct to Export to CSV topic in the Readme help for details.
_________________________
Andrew Bates

Top
#27959 - 07/12/11 10:59 AM Re: Exporting to CSV through Command Line - Grid View [Re: Retired_Guy]
GeorgeandLaura Offline
Adagio Scholar

Registered: 08/09/10
Posts: 92
Loc: LaSalle Ontario
Thanks Andrew. That does work, except that it forces ALL USERS to export to CSV instead of Excel. I was hoping it would be available at the command line level. I am also posting the instructions here because it took a while to find them buried in an enhancement document.

If you don't have one already, create an ssi2xl.ini file in your x:\Softrak\System folder (where 'x' is the mapped drive Adagio is installed to) and enter the following settings, as per your particular environment.

[Initialization]

ForceCSV=1

NOTE: If you have Excel installed but want to use a CSV view instead you must have this setting. The setting is global to all users. Therefore, a site that has some machines with Excel and some with another viewer, say Open Office, would not need or want the setting 'on' unless they want ALL stations to use a viewer even if they have Excel (i.e. stations with Excel who wanted to use Excel would not be able to).


I am also VERY interested in an .ini setting that suppresses the Startup-splash screen for Grid View if that is a possibility.
Thanks.

Top
#27960 - 07/12/11 11:20 AM Re: Exporting to CSV through Command Line - Grid View [Re: GeorgeandLaura]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Don't include the ForceCSV setting if you don't want to do this for all work stations. Just name the specific workstation in the INI file. Here is some more documentation about how this works:
Quote:

Running without Excel

It is possible to use Ssi2Xl without Excel installed on a site. Ssi2Xl will generate a CSV file and launch a selected CSV file viewer. To accomplish this the following must be provided.
  • An Ssi2Xl.ini file must exist where Ssi2Xl.dll is loaded from.
  • There must be a section in the Ssi2Xl.ini file named Initialization
  • There must be an entry the Initialization section <machine name>-CSVViewer=<program name>
  • An optional entry the Initialization section <machine name>-CSVViewerOptions=<program options>
  • An optional entry the Initialization section <machine name>-CSVDir=<data path>

<machine name> is the name of the machine that this entry references - same as the Environment variable COMPUTERNAME
<program name> the fully qualified path name of the executable to launch when the creation of the CSV file is complete
<program options> passed on the command line for the program described above
<data path> is the location to place the CSV file if no name is provided

NOTE: If <machine name>-CSV(Viewer|Dir) is not found then Ssi2Xl will look for *-CSV(Viewer|Dir)


If the EXE specified to open the resulting CSV file is not found, no error is reported.

Or, presuming that you are doing this after hours in a batch file, start the batch file by copying in an SSI2XL.INI file with the CSV setting, perform the ExcelDirect GridView commands, then copy back the original INI settings.

Don't hold your breath for suppressing the splash screen. Why is this important to you?


Edited by Andrew Bates (07/12/11 11:47 AM)
Edit Reason: New notes
_________________________
Andrew Bates

Top
#27965 - 07/12/11 12:31 PM Re: Exporting to CSV through Command Line - Grid View [Re: Retired_Guy]
GeorgeandLaura Offline
Adagio Scholar

Registered: 08/09/10
Posts: 92
Loc: LaSalle Ontario
Thanks Andrew, This will be running at regular intervals all through the day. It looks like it will be an application that will be on someone's workstation so we want it to run in the background as much as possible. There are other options but we are trying to meet the client's request as close as we can.

The above instructions look like it applies only if Excel is not installed. The problem is Excel is installed on this machine, we just don't want to use it, we want it to go to .CSV.
Thanks again.

Top
#27967 - 07/12/11 01:59 PM Re: Exporting to CSV through Command Line - Grid View [Re: GeorgeandLaura]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
How about running it as a session on the server? or dedicating a machine to running the process? Since I don't really know what you are trying to accomplish, it's difficult to suggest an optimal strategy.

Of course, you could also adopt the "Copy INI" strategy for your process, and the user on the workstation would only notice if they happened to click the ExcelDirect button while the GV Export was happening in the background.


Edited by Andrew Bates (07/12/11 02:28 PM)
Edit Reason: Background Copy
_________________________
Andrew Bates

Top
#27968 - 07/12/11 02:39 PM Re: Exporting to CSV through Command Line - Grid View [Re: Retired_Guy]
GeorgeandLaura Offline
Adagio Scholar

Registered: 08/09/10
Posts: 92
Loc: LaSalle Ontario
I have already suggested those two things. I think a server app is the best option, but not my decision. Basically the file that grid view produces is used to control some automated machinery. Very cool when we get it in. Thanks for your advice.

Top
#27969 - 07/12/11 02:45 PM Re: Exporting to CSV through Command Line - Grid View [Re: GeorgeandLaura]
Michael Mulrooney Offline
Adagio Virtuoso

Registered: 02/07/02
Posts: 839
Loc: Vancouver, BC
"The above instructions look like it applies only if Excel is not installed."

No, not the case. The above works whether or not Excel is installed on the machine.

Top


Moderator:  Christa_Meissner 
Who's Online
1 registered (1 invisible), 112 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
1865 Members
5 Forums
14459 Topics
70635 Posts

Max Online: 432 @ 01/20/25 10:17 PM
April
Su M Tu W Th F Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30