miki Posted August 18, 2006 Share Posted August 18, 2006 I have written an autoit script and I have a problem with this part of code: *** #include"ExcelCom.au3" $FilePath=@ScriptDir&"\kesa.xls" $z=_XLArrayRead($FilePath,1,"A1:M93",1) _XLsave($FilePath,1,1) I can read the Excel cell and store their value on local variable that I use in other part of the script. But when I change a value of an Excel cell the other cell linked to the previous arent refreshed. Es. If before A1=2 , B1=4 C1=A1+B1=6 After I run the script *** And then I change the value A1 from 2 to 7. But the C1 cell show always the value 6 instead of the correct value 11. I can see the value 11 in the C1 cell only when I save the xls file. Is there a solution on that problem, maybe changing the synthax of the script? Thanks for any help Link to comment Share on other sites More sharing options...
randallc Posted August 18, 2006 Share Posted August 18, 2006 Hi,re-calculation deliberately is forced only with 1. _XLSave etc, any save.2. _XLCalcTurns off calculation to manual, and returns to auto/ manual which was preset if "Save" requested_XLCalc(ByRef $s_FilePath,$s_i_Visible=0 ,$i_Suppress=0)So use number 2 if you are not saving.Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
miki Posted August 18, 2006 Author Share Posted August 18, 2006 @ randallc Thans for the advice. I have added the line _XLCalc($FilePath) and now the script is: #include"ExcelCom.au3" ;#include"Array2D.au3" $FilePath=@ScriptDir&"\kesa.xls" $z=_XLArrayRead($FilePath,1,"A1:M93",1) _XLCalc($FilePath) Now the calculation is OK but when the script end, the Excel windows disappear and I don't want it. What can I do for that? Link to comment Share on other sites More sharing options...
randallc Posted August 18, 2006 Share Posted August 18, 2006 Hi, _XLCalc($s_FilePath,1 )should keep visibility? Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
miki Posted August 18, 2006 Author Share Posted August 18, 2006 @ randallc Ok now I have the refresh and the Excel window active. Thank you very much! P.S. Excel UDF are very useful great work, you are the Can you tell me where learn about the parameters to pass to " _XL" UDF functions? Link to comment Share on other sites More sharing options...
randallc Posted August 18, 2006 Share Posted August 18, 2006 good, Sorry it is not brilliantly documented; in the "ExcelCom.au3" file, comments first 50 lines or so?... Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
miki Posted August 18, 2006 Author Share Posted August 18, 2006 good,Sorry it is not brilliantly documented; in the "ExcelCom.au3" file, comments first 50 lines or so?...Best, RandallOK thans a lot 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