Decimal places

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JC1874
Posts: 18
Joined: 14 May 2021, 06:55

Decimal places

Post by JC1874 » 19 Oct 2021, 07:06

Hi,

I'm trying to get data from an excel file with 10 decimal places but the string length seems to only pick up the first 9. Is there a maximum set to 9? Can this be changed?

Thanks,
Andrew

User avatar
flyingDman
Posts: 2821
Joined: 29 Sep 2013, 19:01

Re: Decimal places

Post by flyingDman » 19 Oct 2021, 13:14

try:

Code: Select all

xl := ComObjActive("excel.application")
xl.selection.cells.NumberFormat := "0.00000000000000000000"        ; change the # of 0's to your liking
; xl.activesheet.cells.NumberFormat  := "0.00000000000000000000"        ; for the whole worksheet
see: https://docs.microsoft.com/en-us/office/vba/api/excel.range.numberformat
14.3 & 1.3.7

Post Reply

Return to “Ask for Help (v1)”