Jump to content

Opening an Excel File that has spaces in Filename


Recommended Posts

Hi all, I guess this is easy but I can't get it to work :P

I have the following code which I need to open a speadsheet but it assumes each word of the spreadsheet name is a seperate spreadsheet and therefore tries to open 'example.xls', 'spreadsheet.xls', 'with.xls' etc...

Does anyone know what to alter in order for this to work?

$file_location = "example spreasheet with username attached - " & @username
Run("C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE" & " " & $file_location & "")

Cheers,

rrenis

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...