don't know how to format the whole excel worksheet in Text format

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
kwfine
Posts: 16
Joined: 26 Nov 2015, 06:46

don't know how to format the whole excel worksheet in Text format

20 Jul 2018, 14:04

Hi all,

I have created an excel file and it is opened without any problem,
but I don't know how to format all the cells in Sheet1 to the specific format, "Text" other than "General"

Code: Select all

path := "E:\test1.xls"   
sleep, 100
XL := ComObjCreate("Excel.Application")
sleep, 100
XL.Workbooks.Open(path)
sleep, 100
XL.Visible := True
Please help me!

Thank you!

Kitty
Guest

Re: don't know how to format the whole excel worksheet in Text format

21 Jul 2018, 22:52

Hope this helps:

Code: Select all

XL.Sheets(1).Range("A:V").NumberFormat := "@" ;change the column format to 'text' on columns A to V

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Google [Bot], Nerafius and 84 guests