Sign in to follow this  
Followers 0
Krikov

Convert VB Code To Autoit Code

4 posts in this topic

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]

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

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 = ""


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0