| View previous topic :: View next topic |
| Author |
Message |
oren222 General User

Joined: 01 May 2006 Posts: 5
|
Posted: Tue May 09, 2006 1:05 am Post subject: Open csv file through command line |
|
|
I'm trying to open a csv file using shellexecute in vc. I managed to do so, but the problem is that the text import dialog opens up every time. I'm actually using the default parameters, so there is no need for it. Is there any way to prevent it from opening with a command line parameter.
I am not using the SDK since I had serious problems with making it work and I was hoping there is some easy solution for this task. |
|
| Back to top |
|
 |
garethdart24 Newbie

Joined: 09 May 2006 Posts: 2 Location: Nepal
|
Posted: Tue May 09, 2006 8:11 pm Post subject: |
|
|
I've encountered a similar problem opening tab delimited text files with scalc.exe using the command line - it always opens in writer. I'm currently trying to solve this.
G
Edit: renaming the file extension to a scalc type does not work. |
|
| Back to top |
|
 |
garethdart24 Newbie

Joined: 09 May 2006 Posts: 2 Location: Nepal
|
Posted: Tue May 09, 2006 9:30 pm Post subject: |
|
|
However, changing the file extension to .csv does solve the problem. The user is still presented with the file import dialogue, but I think I can make the assumption that any user using OO instead of Excel will be of sufficient intelligence to remember to specify the tab character as the delimiter before pressing OK as long as we mention it in our app's help file. I did parse the file beforehand to screen for tabs and replace with commas, but have decided this is unnecesary.
This approach worked with the LAUNCH EXTERNAL PROCESS command in 4D.
G |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Wed May 10, 2006 12:18 pm Post subject: |
|
|
If you open have to open the same document frequently my small set of macros may help.
http://www.oooforum.org/forum/viewtopic.phtml?t=35604
It opens a csv regardless of it's extension.
The API- forum has some other examples with file picker dialogs. |
|
| Back to top |
|
 |
|