How to open comma delimeted files automatically

A

alexkuzn

Excel pros please help!
I need to make Excel start from command line and open a comma delimeted
text file. (like this; excel.exe myCommaDelimetedFile.txt)
File names will have different names but the same extention (*.txt)

Thanks!
 
T

Tushar Mehta

You may be able to accomplish the same effect though not necessarily
with the stated command.

Write a VBScript script that (1) gets the desired filename through its
arguments, (2) uses automation to run XL, and (3) tells it to open the
desired file. To get the syntax for (1) and (2) adapt the code at
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/script56/html/wscondrivingapplications.asp

To get the code for (3), open XL, turn on the macro recorder (Tools |
Macro > Record new macro...), do whatever it is you want to do through
the GUI, and turn off the recorder. XL should give you the necessary
code, which you can adapt to use the result of (1)

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top