#include <Excel.au3>
#include <FileOperations.au3>
#include <WindowsConstants.au3>
FileRecycle(@DesktopDir & "\Мультимедиа*.xls")
FileRecycle(@DesktopDir & "\Neo*.xls")
FileRecycle(@DesktopDir & "\Goods.rar")
Sleep(500)
InetGet("http://www.neo.poltava.ua/files/Goods.rar", @DesktopDir & "\Goods.rar", 1, 0)
$SUNRAREXE = @ProgramFilesDir & "\WinRAR\UnRAR.exe"
$SRARFILE = @DesktopDir & "\Goods.rar"
$SUNRARDIR = @DesktopDir
Run($SUNRAREXE & ' e "' & $SRARFILE & '" "' & $SUNRARDIR & '"', @WorkingDir, @SW_HIDE, 2)
Sleep(500)
FileRecycle(@DesktopDir & "\Goods.rar")
$FILELIST = _FO_FILESEARCH(@DesktopDir, "Neo*.xls", True, 0, 1, 0, 0)
$EXTR = StringRegExp($FILELIST, "Neo(..)(..)(..).xls", 3)
FileMove("Neo*.xls", "Мультимедиа " & $EXTR[2] & "." & $EXTR[1] & ".20" & $EXTR[0] & ".xls")
$SFILEPATH1 = @DesktopDir & "\Мультимедиа " & $EXTR[2] & "." & $EXTR[1] & ".20" & $EXTR[0] & ".xls"
$OEXCEL = _ExcelBookOpen($SFILEPATH1, 0)
_ExcelWriteCell($OEXCEL, "", 1, 1)
_ExcelWriteCell($OEXCEL, "с.Стаси ул.Яковенка 10б", 2, 1)
$OEXCEL.ActiveSheet.Shapes.Range("Picture 1").Delete
$OEXCEL.ActiveSheet.Shapes.AddPicture(@DesktopDir & "\Мультимедиа.jpg", True, True, 0, 0, 410, 70)
$OEXCEL.ActiveSheet.Range("B3").Select
$OEXCEL.ActiveSheet.Outline.ShowLevels(1)
_ExcelBookSave($OEXCEL)
_ExcelBookClose($OEXCEL)
Sleep(500)
MsgBox(64, "Готово!", "Прайс-лист успешно обновлен!", 5)