Medic873 Posted March 14, 2010 Share Posted March 14, 2010 When ever I try to attach to any excel workbook it keeps giving me a error messgae. Error 191 #include <Excel.au3> #include <File.au3> $sFilePath = @TempDir & "\Temp.xls" If Not _FileCreate($sFilePath) Then ;Create an .XLS file to attach to MsgBox(4096, "Error", " Error Creating File - " & @error) EndIf _ExcelBookOpen($sFilePath) $oExcel = _ExcelBookAttach($sFilePath) ;with Default Settings ($s_mode = "FilePath" ==> Full path to the open workbook) _ExcelWriteCell($oExcel, "If you can read this, then Success!", 1, 1) ;Write to the Cell MsgBox(0, "Exiting", "Press OK to Save File and Exit") _ExcelBookClose($oExcel, 1, 0) ;This method will save then Close the file, without any of the normal prompts, regardless of changes dose anyone know how to use this. Thank You Link to comment Share on other sites More sharing options...
Yoriz Posted March 14, 2010 Share Posted March 14, 2010 Thats the example from the help file and it works ok for me. GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF. Link to comment Share on other sites More sharing options...
dani Posted March 14, 2010 Share Posted March 14, 2010 Can you specify what fails exactly? Also, I have one script which intensively uses Excel files but I never use _ExcelBookAttack -- to my knowledge you can just use _ExcelBookOpen and use the returned handle. Isn't _ExcelBookAttach used when Excel is already running? Please correct me when I'm wrong 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