Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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.
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.
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]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
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.
Thanks very much indeed Rakesh, that works perfectly.