Paste as string in Excel Topic is solved
-
- Posts: 4
- Joined: 20 Oct 2018, 06:29
Paste as string in Excel
Hi, I have made a simple script that copy in PDF a number and paste it in excel (no via COM), just to use it in maths op.
But, the issue is that now and then it paste the number as text.
Does anyone knows how to fix this bug?.
Thank you.
Re: Paste as string in Excel
It could be that when you are copying the text (either manually or via script), you are inadvertently catching a Space character either before or after the number. That would probably be interpreted by Excel as text.
Russ
Russ
-
- Posts: 11
- Joined: 11 Feb 2022, 06:39
Re: Paste as string in Excel Topic is solved
Try to trim the clipboard before paste
Moderator edit: Added [code][/code] tags.
Code: Select all
;Autohotkey v1:
clipboard := Trim(clipboard)
Code: Select all
;Autohotkey v2:
A_Clipboard := Trim(A_Clipboard)
Moderator edit: Added [code][/code] tags.