Another good way to do this is to use the xls file extension for your csv file. Use the Windows start command to launch the file. Excel will recognize it as CSV and load it. You don't need the path to Excel. You can even embed formulas into the csv file, for example: =sum(a2:a30)
To open the spreadsheet (really a CSV or Tab-Delimited file, etc): PRINT ESC:STX:'>start "" /D ' : "f:\ f:\ralph.xls":CR The start command works differently in Windows 9x (start /m "f:\ralph.xls"). Also, you can launch URL's into the default web browser this way, or just about anything as long as there is a valid file association for the given file extension. Craig McDonald Gensco -----Original Message----- From: Craig McDonald [mailto:[EMAIL PROTECTED] Sent: Monday, August 01, 2005 9:58 AM To: '[email protected]' Subject: RE: [U2] Open Excel and Import a file or execute a command from a localPC Another good way to do this is to use the xls file extension for your csv file. Use the Windows start command to launch the file. Excel will recognize it as CSV and load it. You don't need the path to Excel. You can even embed formulas into the csv file, for example: =sum(a2:a30) To open the spreadsheet (really a CSV or Tab-Delimited file, etc): PRINT ESC:STX:'>start "" /D ' : "f:\ f:\ralph.xls":CR The start command works differently in Windows 9x (start /m "f:\ralph.xls"). Also, you can launch URL's into the default web browser this way, or just about anything as long as there is a valid file association for the given file extension. Craig McDonald Gensco -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tony Gravagno Sent: Friday, July 29, 2005 6:46 PM To: [email protected] Subject: RE: [U2] Open Excel and Import a file or execute a command from a localPC Ralph Burton u2programmer-at-yahoo.com |U2UG| wrote: > Here's what I attempting in Accuterm 2000. > The "notebook" line works, but the excel line flashes > something fast and returns me > to Accuterm. Weird huh? I went to my PC and used RUN > command Excel f:\ralph.csv and that worked... here's > the code: > > STX=CHAR(2); ESC=CHAR(27); CR=CHAR(13) > PRINT ESC:STX:">Excel f:\ralph.csv":CR > PRINT ESC:STX:">notepad f:\ralph.csv":CR > END Notepad might be in your execution PATH but Excel probably isn't. If that's the case I'm surprised it runs from Run/cmd. Try replacing your Excel line with this: PRINT ESC:STX:">Excel f:\ralph.csv > f:\ralph.txt":CR Then check ralph.txt for an error message which may be this: "'excel' is not recognized as an internal or external command..." So try this: MYPATH="C:\Program Files\Microsoft Office\OFFICE11" Or whatever the real path is to your Excel.exe. Then: PRINT ESC:STX:'>"':MYPATH:'Excel" f:\ralph.csv':CR Add the "> ralph.txt" part back in if that doesn't work. And for grins, check this out (remove the REMOOVE to use the URLs: http://nebula-rndREMOOVE.com/products/analysis.htm That product is no longer offered but components will be used in future offerings. Here is an audio/video presentation showing it in action. http://nebula-rndREMOOVE.com/demos/nebulanalysis/ Again, I'm not selling this code anymore but it shows what's possible outside of AccuTerm and CSV... HTH Tony Gravagno Nebula Research and Development TG@ removethisNebula-RnD .com ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
