vkrisz81 Posted January 14, 2016 Share Posted January 14, 2016 (edited) Helloso when i try attach an opened excel window, it fails!when i try list out by using excel_booklist also cant find the opened window.. i cant find out HOW!!!sometimes works, sometimes dontand interesting, if once it find, next time it says error..WOW Edited January 14, 2016 by Melba23 Amended title Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 14, 2016 Author Share Posted January 14, 2016 so i open an existing xls by using excel_openbook, and other program cant find it by using booklist()can anybody tell how it POSSIBLE? Link to comment Share on other sites More sharing options...
spudw2k Posted January 14, 2016 Share Posted January 14, 2016 Do you have any code we can inspect? Can you isolate the code that is producing the problem and share it? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 14, 2016 Author Share Posted January 14, 2016 (edited) so i tried to get opened excel's title by using winlist, and user excel attach with parameter "Title" and still nothingso excel UDF in this way USELESSin my opinion cant be usefull something what sometimes works, sometimes not in same way.. trustless Edited January 14, 2016 by vkrisz81 Link to comment Share on other sites More sharing options...
BrewManNH Posted January 14, 2016 Share Posted January 14, 2016 Instead of being an ass about it, post your code so we can test it ourselves. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 14, 2016 Author Share Posted January 14, 2016 (edited) sure i post but not much code needed, only 2 rows the whole what you can find out also by the given datas but here you arethis bug is present here since a year almost.. so i am not suprised that this does not work properly..my main program opens file$excel=_Excel_Open() _Excel_BookOpen($excel,@ScriptDir&"\_work.xls")and client try reach this and handle cells in common excel file:$a=_Excel_BookList() _ArrayDisplay($a) $excel=_Excel_BookAttach("_work.xls","filename")a delivers NOTHING, as if already opened excel would not exist..but there isi tried open pre the excel and run the program after to link but nothingand sometimes it finds instanton other machine it works.. here NOW notbut how can program can be good if it works if it wants not if it needed Instead of being an ass about it, post your code so we can test it ourselves.if it would work at you, that would not solve my problem that sometimes works NOTunstable i also tried use winlist to get excel's title and try attach by using title but also unsuccess!$a=WinList("[REGEXPTITLE:(?i)(.*_work.*|.*Microsoft Excel.*)]") $excel=_Excel_BookAttach($a[1][0],"Title") as i remember it works only first time, after it never till i restart whole computer..so excel attach only find when you ask it first, never moreonly if restart whole machine.. so ridicoulos Edited January 14, 2016 by Melba23 Multiple posts merged Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 14, 2016 Moderators Share Posted January 14, 2016 vkrisz81,Stop posting every 2 minutes to artificially boost your post count.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
water Posted January 14, 2016 Share Posted January 14, 2016 You have to do two things:Add error checking to your script. Every _Excel* function sets @error in case of a problem. Check and only keep on processing when @error = 0You have to save the returned object so you can access it later. Else it will be dropped. means:$oExcel=_Excel_Open() If @error Then Exit MsgBox(0, "Error!", "_Excel_Open failed with error " & @error) $oWorkBook = _Excel_BookOpen($oExcel, @ScriptDir & "\_work.xls") If @error Then Exit MsgBox(0, "Error!", "_Excel_BookOpen failed with error " & @error) My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 15, 2016 Author Share Posted January 15, 2016 (edited) vkrisz81,Stop posting every 2 minutes to artificially boost your post count.M23 Edited January 15, 2016 by vkrisz81 Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 15, 2016 Author Share Posted January 15, 2016 You have to do two things:Add error checking to your script. Every _Excel* function sets @error in case of a problem. Check and only keep on processing when @error = 0You have to save the returned object so you can access it later. Else it will be dropped. means:sometimes shows i have no acces to that excel file because other program use it..sure other use because more program must use same excel to handle common datasbest way would be if i would be able shared memory addresses.. but i cant solve it, so i need this broken method to share data between programs Link to comment Share on other sites More sharing options...
water Posted January 15, 2016 Share Posted January 15, 2016 Glad you removed your comments from Melba's and my posts. You would have been in big trouble if a Mod would have noticed them.Now, as you have cooled down, lets see how to help you solve your problem:sure other use because more program must use same excel to handle common datasExcel can only have multiple people use the same Workbook when the access diferent worksheets. So this is quiete limited.First question:Do all users need write access to this workbook or would read access be fine as well? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 15, 2016 Moderators Share Posted January 15, 2016 vkrisz81,It seems you are lucky that I was on the golf course this morning. I will be watching you closely from now on.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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