Jump to content

Liquidlogic

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Liquidlogic

  1. Hello, thank you, we have progress. Error is variation of this: But Old name is _FilterDatabase. If I delete msgbox function, script is running. M.
  2. It means, that function cannot find the file? _Excel_BookOpenEX is yours from this thread: I´ve got the same problem with calling _Excel_BookOpen
  3. Finally, error is here. Thank you
  4. I am running 3.3.14.2 It is sou strange, no error when you offer help Error message: <$oExcel.Workbooks(1).RefreshAll> <$oExcel.Workbooks(1).RefreshAll> ^ ERROR And line 2623 Thank you
  5. Water, thanks for your reply, I´ll try it. So, my script is working, but can you help me do it absolutely bulletproof? Sometimes, script end in error in row of refresh excel <$oExcel.Workbooks(1).RefreshAll>. Here is all my code: #include <Excel.au3> #include <PowerPoint.au3> #include <WinAPIFiles.au3> ; excel refresh Local $oExcel = _Excel_Open() ; open excel Local $oWorkbook = _Excel_BookOpenEX($oExcel, "S:\Back Office VIP\Projekty\WB OUTBOUND\out.xlsx" ) ; open workbook $oExcel.Workbooks(1).RefreshAll ; refresh ;$oExcel.Worksheet(1).PivotTables ("KT4" ).PivotCache.Refresh _Excel_BookClose ( $oWorkbook , True ) ; Close workbook, save _excel_close ($oExcel) ; close excel ; ppt refresh $objPPT = _PPT_PowerPointApp() ; open pwpoint $objPres = _PPT_PresentationOpen($objPPT, "S:\Back Office VIP\Projekty\WB OUTBOUND\wallboard.ppt") ; open ppt _PPT_UpdateLinks ($objPres) ; update links _PPT_PresentationSaveAs($objPres, "S:\Back Office VIP\Projekty\WB OUTBOUND\wallboard.ppt") ; save ppt _PPT_PresentationClose($objPres) ; close ppt _PPT_PowerPointQuit($objPPT) ; close pwpoint ; ppt copy FileCopy ( "S:\Back Office VIP\Projekty\WB OUTBOUND\wallboard.ppt", "\\WCZC038BKFM\Prezentace" , $FC_OVERWRITE) ; copy file Thank you so much. L.
  6. Hello, I´ve redesigned my script. All works fine, but I need help with refresh pivot table. In my mind is workaround, after refreshing and closing, open xlsx again to refresh PT, but it is barbarian #include <Excel.au3> Local $oExcel = _Excel_Open() ; open excel Local $oWorkbook = _Excel_BookOpen($oExcel, "S:\Back Office VIP\Projekty\WB OUTBOUND\out.xlsx" ) ; open workbook $oExcel.Workbooks(1).RefreshAll ; refresh _Excel_BookClose ( $oWorkbook , True ) ; Close workbook, save _excel_close ($oExcel) ; close excel Thank you
  7. Hello, i need to check my code for refreshing excel by autoit. I´ve got excel with external data by MSquery. Data are loading with opening workbook. I´ve got 6 tables with data and 6 pivot tables from them. I am imaging those pivot tables to special worksheet by getcontdata. But Pivot tables are not refreshing What I need - open excel, refresh all links (MS query links are automated to opening workbook), refresh all PT, refresh image, save, close. Here is my code: #include <Excel.au3> #include <PowerPoint.au3> #include <WinAPIFiles.au3> ; excel refresh $prog_excel = _Excel_Open() ; open excel $workbook = _Excel_BookOpen($prog_excel, "S:\Back Office VIP\Projekty\WB OUTBOUND\out.xlsx" , False, True, Default, Default, 3) ; open workbook, update links $prog_excel.ActiveWorkbook.RefreshAll ; refresh all _Excel_BookClose ( $workbook , True ) ; Close workbook, save _excel_close ($prog_excel) ; close excel another part of the code is updating link in ppt and copying ppt to external drive. It works fine. If you want, I can send excel, but it has 5MB. Thank you.
×
×
  • Create New...