Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem launching Excel with relative path

I have a button where I export data to a csv file where the file pathname is in the format 'DirectoryName\FileName.csv'. When I click on the button the data is successfully exported to the file in the directory specified.

However, I need to launch MS Excel to allow the user to view the csv file (and amend if necessary). This fails because I have truncated the full path name on the export to be a relative path. I have attempted to correct using the Parameters and Start In fields in the Launch dialogue box, but with no success. It fails because of space characters in the actual full path, i.e. C:\Documents and Settings\....... etc, Excel says cannot find c:\Documents.xslx

Has anyone any suggestion on how to overcome.

Thanks

Peter

1 Solution

Accepted Solutions
disqr_rm
Partner - Specialist III
Partner - Specialist III

Try enclosed and let me know what happens. When I try it, it works -> when I press button, xx.csv file is opened in excel.

View solution in original post

6 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

In your button in the application just specify Documents.xslx. It will automatically open in the Excel. You do not need to specify application for standard file extensions, as windows knows how to open that file. Just like, when you dounble click on the xls file, it will open in excel.

Not applicable
Author

Hi Rakesh

Thank you for the suggestion but that did not work for me either. I put FineName.csv in the application box and I get the message 'Failed to Launch FileName.csv' I also tried putting excel.exe in the applicatin and Filename.csv in the parameters and that also did not work.

Not applicable
Author

For additional information, I have created 2 buttons which work with relative address, 1 to export the file FileName.csv and 1 to launch excel to load FileName.csv.

The export button has the export to file set to 'Directory\FineName.csv'

The launch button has the application set to 'excel.exe' and the parameters as 'Directory\FineName.csv'

I now need the export and the launch combining together. When I apply the above parameters into a single button I get my [collapse]original message 'Cannot find file C:\Documents.xslx'

[/collapse]
Not applicable
Author

Can I use the system variable QvWorkPath in a Launch button, if so what is the format for the filename which includes QvWorkPath? My path would be QvWorkPath\Directory\FileName.csv

disqr_rm
Partner - Specialist III
Partner - Specialist III

Try enclosed and let me know what happens. When I try it, it works -> when I press button, xx.csv file is opened in excel.

Not applicable
Author

Thanks very much indeed Rakesh, that works perfectly.