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.