Jump to content

Convert VB Code To Autoit Code


Krikov
 Share

Recommended Posts

Hello I Have Wrote A Script in VB That Open File.CSV And Then Save It In Defrent Name

But In Pure .XLS Format.

That Was Easy In VB i Want To Know How To Convet that Code To AutoIt Code

AutoMan

Dim objExcel
Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open "C:\temp\123.csv"
objExcel.ActiveWorkbook.SaveAs FileName:="c:\temp\itzik.xls", FileFormat:=xlNormal
objExcel.Quit
Set objExcel = Nothing

:P

[topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic]

Link to comment
Share on other sites

i Know The AutoIt Script Language Good

This is Autoit Code But Look Ant That Line "$objExcel.ActiveWorkbook.SaveAs (FileName:="c:\temp\itzik.xls", FileFormat:=xlNormal)"

i dont know how to convet it to the Autoit Syntax

Dim $objExcel
$objExcel = ObjCreate("Excel.Application")
$objExcel.Workbooks.Open = "C:\temp\123.csv"
$objExcel.ActiveWorkbook.SaveAs (FileName:="c:\temp\itzik.xls", FileFormat:=xlNormal)
$objExcel.Quit
Set $objExcel = Nothing

[topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic]

Link to comment
Share on other sites

  • Developers

Const $xlNormal = -4143
$objExcel = ObjCreate("Excel.Application")
With $objExcel
    .Workbooks.Open ("C:\temp\123.csv")
    .Application.DisplayAlerts = 0
    FileDelete("c:\temp\test.xls")
    .ActiveWorkBook.SaveAs ("c:\temp\test.xls", $xlNormal)
    .Quit
EndWith
$objExcel = ""

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...