NSearch Posted April 14, 2005 Share Posted April 14, 2005 Hello. Hopefully this will be an easy fix so that I can get back rollin on this bit of code. I am trying to run() an excel spreadsheet, but when I go to call up the file AutoIt is breaking apart the file name. (i.e "test page.xls" gives me an error that test.xls and page.xls could not be found) I have renamed the file test_page.xls and it works fine, but I do not want to have to go through and rename all the files, because there are macros that depend on the specific file name. Thanks. Link to comment Share on other sites More sharing options...
eJan Posted April 14, 2005 Share Posted April 14, 2005 Try this one:MsgBox(0, "Regular Expression Replace Test", StringRegExpReplace("test page.xls", " ", "_")) Link to comment Share on other sites More sharing options...
NSearch Posted April 14, 2005 Author Share Posted April 14, 2005 eJan, Thanks for your reply, but that did not work. Are there a set of characters to enter in the place of a space so that AutoIt sees the space instead of two seperate words? Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted April 14, 2005 Developers Share Posted April 14, 2005 (edited) eJan, Thanks for your reply, but that did not work. Are there a set of characters to enter in the place of a space so that AutoIt sees the space instead of two seperate words?Thanks<{POST_SNAPBACK}>use double quotes around the file name and single around the command like:Run('exel.exe "c:\temp\file name with spaces.xls" ') Edited April 14, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
NSearch Posted April 14, 2005 Author Share Posted April 14, 2005 WONDERFUL! Thank you very much JdeB. Works perfect now. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now