Sign in to follow this  
Followers 0
chaitanyagutala

@desktopdir

2 posts in this topic

Dear all, I have a script with which I am writing data to 2 excel files simultaneously.In that script I am using @scriptdir command.While using this cmd, I have 2 excel files and script in one folder and @scriptdir command worked fine.But now I am going to change excels to two different folders. One onto my desktop and other to subfolder in desktop.For this I am replacing @scriptdir with @desktopdir but it is not working.Moreover, while writing to data in excel in desktop, it is overwriting and it is visible.Please help me out in this reg.Thanks and Regards


ChaitanyaKumar GI dont make mistakes.I just have learning.I have no special talents. I am only passionately curious.

Share this post


Link to post
Share on other sites



Without any example code we can only guess what you're doing wrong, but keep in mind that @desktopdir returns the path to the desktop without a trailing "\".

To write to a folder on the desktop you need to use this syntax:

@desktopdir & "\foldername\filename.xls" not @desktopdir & "foldername\filename.xls

To add data to the excel file instead of overwriting you can either get the last row that has data in excel and start writing from there, or read the excelfile, then add your data to that and write the entire thing back (technically still overwriting)

_ExcelBookOpen() has a "visible" parameter you can set to 0 to run excel hidden.

If this doesn't help, then post some example code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0