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

Get help with using AutoHotkey 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”

Who is online

Users browsing this forum: Bing [Bot], DRocks, pteronaut, Rohwedder, wyw and 23 guests