File Change Between Logging Set And Component


igho

Recommended Posts

I desire to log to a file so that I can open it in Excel. I also create a button component that I can just click to change file names that I want my logging saved into. Initially, I had my filename under my logging set end as in .csv. Also I had the file name on the button component end as in .csv. However, I noticed that when I used the button component to change my file name/path to a new file name, it changes the file name/path under logging set also, but doesn't make it end as in .csv. This problem now makes it difficult for me to open the saved file successfully in Excel, because the system tells me that it is saved in a format different from Excel, even though I have my FileSaveDialog function coded for any new file name to always end in .csv?

Link to comment
Share on other sites

Thanks a lot for your prompt response. The code I used is just a copy of what you used and posted in other post. The code is: private string fileName = file.FileSaveDialog(logging.myLog.strFileName,"","*.csv","CSV Files")

if (!isEmpty(fileName))

logging.myLog.strFileName = fileName

endif

Link to comment
Share on other sites

Guru, thanks for your response. When I add the script you suggested, then am no longer able to change the directory and file name from the dialog window that pops up. Rather, the file path and name remain the same even after I change it in the dialog window.

Link to comment
Share on other sites

Guru, I just discovered my mistake. I didn't change the "mylog" in your code to the name of my logging set. Kindly ignore my previous comment that I am not able to change the file name and path from the dialog window. Thanks for your help.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.